What's in a name? Apparently, jail time if you're in China.

A dog breeder in eastern China was detained by police on Monday after giving his two dogs "illegal" names that refer to government and civil service workers.

The man in his 30's named Ban was summoned by police on Monday after posting information about the dogs, named Chengguan and Xieguan, to friends on popular Chinese messaging app WeChat, according to the Xiangyang City Council.

The dog's names ended up attracting controversy because "Chengguan" are officials employed in urban areas to tackle low-level crime, while "Xieguan" are informal community workers such as traffic assistants, according to the BBC.

CHINA DEVELOPS APP TO MONITOR 'DEADBEAT DEBTORS'

Zhangzhou Police said on Chinese social media site Weibo the information was "insulting law enforcement personnel," and prompted an investigation to be launched.

A man in eastern China was detained by police after giving his dogs "illegal" names after government officials.

A man in eastern China was detained by police after giving his dogs "illegal" names after government officials. (Yingzhou Police)

Authorities added that "in accordance with the relevant provisions of the Law of the People's Republic of China on Public Security Administration Punishment," the man must spend 10 days in an administrative detention center.

CHINA IS FIGHTING TO 'PROTECT ITS LEGITIMATE RIGHTS AND INTERESTS' IN TRADE WAR WITH US, STATE MEDIA SAYS

A police officer told the newspaper Beijing News that Ban had been increasingly provocative on his WeChat account, and his actions had "caused great harm to the nation and the city's urban management, in terms of their feelings," according to the BBC.

CLICK HERE FOR THE FOX NEWS APP

Ban, who local media outlets reported as being remorseful over his actions, said he had just given the dogs the names "for fun."

"I don't know the law, I don't know if it is illegal," he told Fuyang News.

China in recent years has been patrolling and cracking down on social media users as the country gears up to launch a social credit system in 2020, which would monitor the behavior of China’s 1.4 billion citizens. Over 1 billion people are current on WeChat.