LISBON — Portugal on Sunday announced its exit from a three-year bailout program that has forced deep spending cuts and set off mass protests — but has also helped the country clean up its public finances and return to the bond markets after halving its budget deficit.

Prime Minister Pedro Passos Coelho said that Portugal had built up sufficient financial reserves to end the program on schedule and without requesting any additional line of credit from its European counterparts. Such a line of credit would have acted as a safety net if the country again struggled to meet its debt financing obligations.

The decision to fully exit the program comes after Portugal’s international lenders — the International Monetary Fund, the European Commission and the European Central Bank — on Friday issued a positive assessment of the country’s progress. Portugal, which was particularly scarred by the European debt crisis, received a bailout of 78 billion euros, or about $108 billion, three years ago.

“With the recovery of our autonomy, Portugal will be on an equal footing with the other member states” of the European Union, Mr. Passos Coelho said in a televised address on Sunday evening, flanked by his ministers.