Veera Somkwamkid

Thai nationalist activist Veera Somkwamkid, center, enters the Phnom Penh International Airport upon his arrival, in Phnom Penh, Cambodia, Wednesday, July 2, 2014.

PHNOM PENH, Cambodia (AP) — Cambodia has agreed to repatriate a Thai ultranationalist activist who has been in prison for three-and-a-half years after illegally crossing the border to promote his political views.

The pardon for Veera Somkwamkid was announced Tuesday by Cambodian spokesman Eang Sophalleth after a meeting between Prime Minister Hun Sen and Thailand’s acting Foreign Minister Sihasak Phuangketkeow.

Veera was arrested in 2010 after crossing the border to publicize claims that frontier areas held by Cambodia actually belonged to Thailand. Veera’s incursion was widely seen as an effort to discredit a Thai political party he opposed for tacitly supporting one of Cambodia’s territorial claims.

Veera was sentenced to eight years in prison after being found guilty of espionage, illegal entry and trespassing in a military zone.