Pereira thanked Ivory Coast President Alassane Ouattara, current head of ECOWAS, for his role in their liberation
Guinea-Bissau's coup leaders released the country's ousted prime minister and interim president after more than two weeks of captivity, allowing the former leaders to travel to Ivory Coast.
The generals now in charge of the small, unstable west African country also pledged a one-year transition back to democracy, a day after regional bloc ECOWAS decided to send hundreds of troops to the country.
Guinea-Bissau, a former Portuguese colony, has a history of coups and other political violence and has in recent years become a major cocaine trafficking hub between South America and Europe.
The military launched the latest coup on April 12, in the middle of a two-round presidential election in which outgoing prime minister Carlos Gomes Junior was the frontrunner and the opposition claimed fraud.
Troops then attacked Gomes' residence with rocket-propelled grenades and detained him, along with interim president Raimundo Pereira, in a power grab that sparked regional and international condemnation.
On Thursday, a summit of the Economic Community of West African States or ECOWAS gave the junta 72 hours to agree to a return to constitutional order and to allow in 500 to 600 troops or face targeted sanctions.
The 15-member bloc, which also condemned a coup in Mali, told both countries to restore democracy and hold elections within a year.
France on Friday welcomed the ECOWAS move and said it was ready to help.
"It was a very good decision," said Foreign Minister Alain Juppe, adding that Paris could give "logistical, material or intelligence support".
On Friday the junta in Guinea-Bissau agreed to a 12-month transition period, having earlier proposed a period twice that long, and agreed to free the detained leaders, military spokesman Daba Na Walna said.
Gomes and Pereira were later welcomed at Abidjan airport by Ivory Coast's Foreign Minister Daniel Kablan Duncan and the African Integration Minister Adama Bictogo, an AFP reporter said.
Pereira thanked Ivory Coast President Alassane Ouattara, current head of ECOWAS, for his role in their liberation, saying that Ivory Coast "is also our country", without further comment.
Bictogo called their liberation "a good sign". It was not immediately known how long the two would stay in Abidjan.
Pereira and Gomes were also due to meet with Ouattara.
The president has pledged a firm response to the recent instability in two countries "to prevent our sub-region from giving in to terrorism and transnational criminality".
Earlier Friday a team of West African leaders left Guinea-Bissau after several hours of closed-door talks with Antonio Indjai, who is widely thought to have masterminded the coup.
Spokesman Na Walna sought to downplay the regional concerns, saying the "return to civilian rule is on track" and adding: "The right place for soldiers is the barracks."
The future transition government "will be a government of technocrats and neutral personalities who will have to oversee a transition period of 12 months", he added.
Since 1998, the country of 1.6 million people has been through one war, four military coups and the murder of one president and four military chiefs-of-staff. No president has ever completed a full term in office.
The Guinea-Bissau army has claimed it staged its coup this month because of an alleged secret deal by the government with Angola, also a former Portuguese colony, to destroy the armed forces.
Angola on Thursday denied its troops had any role in Guinea-Bissau's coup, as the parliament in Luanda agreed to the the recall of about 600 soldiers who had been sent as part of a training project.
"The presence of Angolan troops in Guinea-Bissau was essentially based on a bilateral cooperation pact to train soldiers of the army," junior defence minister Salviano Sequeira told AFP.