President Hugo Chavez on Thursday pardoned dozens of Colombians imprisoned in Venezuela on charges of involvement in an alleged 2004 plot against his government.

The order to free the 41 prisoners took effect with its publication in the government's official gazette, dismissing their convictions on charges of military rebellion.

Chavez announced his decision to free the prisoners last week as a goodwill gesture during his efforts to help broker an unrelated prisoner and hostage exchange between Colombia's government and leftist rebels.

In May 2004, 118 Colombians were arrested at a ranch outside Caracas. Authorities said they were wearing Venezuelan military uniforms and were suspected of belonging to paramilitary group that was plotting to create chaos in the country and assassinate Chavez.

Charges were quickly dropped against 18 of them — including nine minors — and they were sent home. Dozens more were later found innocent.

In October 2005, a military court sentenced three former Venezuelan military officers and 27 Colombians to prison terms ranging from two to nine years.

It was not immediately clear how many of the Colombians remained in prison Thursday or when they would be freed.

Chavez said last week that the pardon applied to all the Colombians except those implicated in the death of a man whose body was found buried near the ranch.

Chavez was preparing to travel to Colombia on Friday for talks with President Alvaro Uribe on his offer to help facilitate an exchange of hundreds of imprisoned rebels for about 45 hostages held by the Revolutionary Armed Forces of Colombia, or FARC.

Both the Colombian government and the rebels have voiced support in principle for the swap but have argued about how to achieve it.