By Megha Rajagopalan and Ben Blanchard

BEIJING (Reuters) - China executed 13 people on Monday for "terrorist attacks" in the far western region of Xinjiang, state media said, while another three were sentenced to death for a lethal attack at Beijing's Tiananmen Square.

"The 13 criminals had planned violent terrorist attacks and ruthlessly killed police officers, government officials and civilians, which took innocent lives, caused huge property losses and seriously endangered public security," the official news agency Xinhua said.

Xinjiang is the traditional home of Muslim Uighurs who speak a Turkic language, and China has blamed previous attacks on Islamist separatists it says seek to establish an independent state there called East Turkestan.

Exiled Uighur groups and human rights activists say the government's own repressive policies in Xinjiang have provoked unrest, something Beijing denies.

The 13 executed men were involved in attacks in different parts of Xinjiang, including one last June that killed 24 policemen and local residents, Xinhua said.

In the Tiananmen case, five people were killed and 40 hurt when a car plowed into a crowd in the square and burst into flames. Those killed included three people in the car.

As well as the death sentences for that attack, another man was sentenced to life and four others received jail terms ranging from five to 20 years, Xinhua said.

Footage of the trial on state broadcaster China Central Television (CCTV) showed suspects in orange jumpsuits at a Xinjiang courthouse, with Uighur women in tears as they watched the proceedings.

The men had formed a "terrorist group" in 2011, state broadcaster CCTV reported. Between December 2012 and the following September, they acquired firearms and explosives and last October traveled to Beijing and raised money to buy the car that would be driven to Tiananmen Square, CCTV said.

Attacks that authorities blame on Uighur separatists have continued.

Story continues

A suicide bombing last month killed 39 people at a market in Urumqi, Xinjiang's capital. In March, 29 people were stabbed to death at a train station in the southwestern city of Kunming.

Knife-wielding attackers wounded four people in a crowded hall where people were playing chess in the western city of Hotan on Sunday, CCTV said in a separate report. Two of the attackers were killed and a third was arrested.

Dozens of suspects in Xinjiang have been arrested and tried in recent weeks, accued of spreading extremist propaganda, possessing banned weapons and other crimes.

(Additional reporting by Joseph Campbell and Li Hui; Editing by Robin Pomeroy)