Lawmakers end more than two years of political stalemate