BEIJING — A prominent Chinese human rights lawyer went on trial Monday and potentially faces eight years in prison over seven social media posts.

Pu Zhiqiang, who has previously represented Chinese activists including Ai Weiwei, is accused of inciting ethnic hatred and “picking quarrels and provoking trouble,” a catch-all charge the government has aggressively used in recent years to stymie political dissent.

Dissident artist Ai Weiwei (left) and lawyer Pu Zhiqiang (right) in a photo taken on July 20, 2012. ED JONES / AFP - Getty Images, file

The 50-year-old was arrested 18 months ago. The case is centered around seven posts on Pu’s microblog criticizing ethnic policy and government officials in the restive province of Xinjiang, where Beijing has been working to quell unrest and outbursts of fighting amongst its Uighur minority.

In another of the posts on Weibo, China's Twitter-like platform, Pu attacked a government official following the deadly high-speed rail crash in Wenzhou in 2011 that killed 40 people. Pu also mocked Mao Xinyu, who is Mao Zedong’s grandson.

Pu was detained in May 2014 with a number of other high-profile Chinese activists after attending a seminar on the Tiananmen Square incident in the run-up to last year's 25th anniversary.

His case is being watched as a barometer of the government of President Xi Jinping's policy towards political dissent.

The U.S. Embassy in Beijing issued a press release calling for Pu's release on Monday, saying he was "being tried under vague charges."

Small protests outside of the Second Intermediate People’s Court in Beijing were broken up by authorities. The Foreign Correspondents’ Club of China accused police of roughing up journalists who were covering the demonstrations.

Maya Wang, a researcher at Human Rights Watch, told NBC News that while Pu has been outspoken over the years, he has always prided himself in his ability to balance his advocacy with the shifting political environment in China.

“Pu’s trial is a litmus test for the Chinese government’s level of hostility towards its civil society and genuine ‘rule of law,'" Wang said. “To have detained him and then put him on trial in the first place is an indication that the government has significantly narrowed space allowed for civil society in China.”

Pu’s case has been taken up by human rights activists around the world.

American Ambassador to China Max Baucus last week released a statement that specifically called for Pu's release.

“Pu Zhiqiang, has been recognized around the world for supporting the rule of law in China, but has been in jail awaiting trial for more than 18 months,” Baucus said. “Releasing him would be a step toward a more just society. Such a society also allows all of its citizens to practice their culture and religion in peace and dignity.”