Biagio Pilieri had been unable to serve as a legislator due to charges accusing him of corruption. The former mayor denies any wrongdoing.
Pilieri was freed after students ended a a three-week hunger strike.
The students demanded that more than two dozen Chavez opponents be let out of confinement, arguing the government foes are facing prosecution or have been imprisoned on politically motivated charges.
Chavez denies persecuting his adversaries.
Pilieri was sworn in as a congressmen Thursday.