(CNN) -- Ousted Honduran President Jose Manuel Zelaya will be granted safe passage to the Dominican Republic as a guest, resolving a diplomatic impasse that kept him trapped in Honduras, Dominican Republic President Leonel Fernandez said Wednesday.
Zelaya, who has been staying at the Brazilian embassy in Honduras, would leave for the Dominican Republic on Tuesday, Fernandez said.
The deal was reached with Honduran President-elect Porfirio "Pepe" Lobo, with the defeated presidential candidates in last November's election signing the accord as witnesses. Lobo takes office next week.
Granting Zelaya safe conduct out of Honduras, where he is wanted on charges of abuse of power, is the first step toward re-engaging Honduras with the international community that repudiated the coup, Lobo said at a news conference Thursday.
Despite polls showing that amnesty for Zelaya remains unpopular, Lobo said that having an ex-president locked up inside an embassy is not the kind of image that will move the country forward.
The agreement will allow Zelaya, his family, and members of his inner circle to leave for the Dominican Republic as guests, rather than under political asylum, a fine point that derailed previous efforts at negotiating his exit.
"This is an exit with dignity," Fernandez said, adding that Zelaya has indicated that his final destination likely will be Mexico.
Zelaya was ousted in a June 28 coup.
After spending months in exile, Zelaya sneaked back into Honduras in September, and has not left the Brazilian embassy. His return was an effort to restart talks to negotiate his return as president.
That never happened.
An agreement was eventually signed, but its implementation has been half-hearted, and Zelaya later called the deal dead.
A previous effort for Zelaya's exit, a petition from Mexico last month, was rejected by the de facto government of Roberto Micheletti because it did not give Zelaya the status of having been granted political asylum.