PORTLAND, Maine — Sens. Susan Collins and Olympia Snowe of Maine both voted for emergency legislation allowing the federal government to avoid default, sending the proposal to President Barack Obama for his signature.

Both senators said the plan approved Tuesday is not perfect but is a step in the right direction.

Collins said defaulting on the nation’s obligations would’ve had dire consequences for the economy. But she said the $14.3 trillion debt is also a threat to a strong economy.

Snowe said it’s important that the measure requires spending reductions equal or greater to the amount the debt ceiling is raised.

Without the legislation, the government’s ability to borrow would have run out at midnight. The bill was subject to a 60-vote threshold to advance.