Investigators had also compelled Bilal Mohammed to dress up and wear a wig so he resembled a CCTV image of the prime suspect in the blast, according to a statement issued on his behalf.
Mohammed, also known as Adem Karadag, and Yusufu Mieraili arrived barefoot, handcuffed and shackled at their plea hearing in a military court.
Changing demographics fuel ethnic tensions- II
A judge read charges including premeditated murder and possession of illegal weapons to the pair through a Uighur translator.
Both said they were not guilty of the bombing charges, although Mohammed -- the suspected bomber -- admitted one charge of entering the country illegally.
"I'm not guilty... but I've been in prison for six months," a disconsolate-looking Mieraili added.
The August 17 bomb killed 20 people and wounded scores more at a Bangkok shrine popular with ethnic Chinese tourists.
A convincing motive has yet to be established for an attack that dented Thailand's key tourist industry and spread fear through a politically febrile country that is under military rule.
But speculation of a link to Thailand's deportation of Uighur migrants to China a month before the bombing has refused to die down.
Police say the pair initially admitted their roles in the bombing.
But Mohammed's lawyer told reporters his client had only confessed after torture and threats of deportation to China, where he feared his life would be in danger.
Mohammed, 31 a Chinese citizen from the Uighur ethnic minority, is accused of being the man seen in CCTV footage wearing a yellow T-shirt and placing a backpack at the Erawan shrine moments before the explosion.
Mieraili, 26 and also a Chinese Uighur, is accused of delivering the backpack bomb.
National police chief Chakthip Chaijinda said it was the "defendants' right" to retract their earlier confessions but rejected any suggestions these were obtained under duress.
Terror links: Suspects in Thailand arrested while fleeing across border
"We have witnesses and clear evidence to prosecute them," he told reporters.
Mohammed was arrested in late August in a block of flats in a Bangkok suburb.
Photographs released at the time showed him surrounded by bomb-making paraphernalia and dozens of fake Turkish passports.
Shortly after the arrest, his lawyer Schoochart Kanpai told reporters that Mohammed admitted carrying out the bombing on the orders of an apparent mastermind -- one of more than a dozen suspects, both foreign and Thai, still at large.
But on Tuesday he said his client had in fact only arrived in Thailand four days after the bombing, having bribed border guards with $600 to enter from Laos.
A statement issued by his lawyer on Mohammed's behalf said the Uighur was taken by a people-smuggler to the Bangkok flat where he was arrested a week later.
During questioning he was allegedly punched, blindfolded by investigators and told he "would be handed over to the Chinese government" unless he confessed to being the bomber in the yellow shirt.
In the statement Mohammed said he was photographed after being forced to wear a wig, glasses and a yellow shirt to make him look like the prime suspect, whose image was circulated across the country.
Mystery still surrounds the motive for the attack, in which the majority of the dead were ethnic Chinese tourists.
Speculation has centred on a link to militants or supporters of the Uighurs, an ethnic group who say they face severe persecution in China, after Thailand forcibly repatriated 109 of the minority last July.
Thai authorities have rejected the theory that the bomb was a revenge attack for the deportations.
Bomb-making materials found in second Bangkok apartment: Thai police
Instead investigators have stuck to the line that it was carried out by a people-smuggling gang angered by a crackdown on its business.
Until Tuesday's hearing the case had largely dropped off the news cycle, easing the pressure on authorities to arrest further suspects despite fears of a bungled investigation.
Police awarded themselves a $84,000 reward after the arrest of Mohammed, even though he had not even been charged at the time.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ