(CNN) - Both Barack Obama and John McCain have released statements reacting to the resignation of Pakistan's President Pervez Musharraf:
Read the statements after the jump
"President Musharraf has made the right decision to step down as President of Pakistan. It is in the interests of his country and the Pakistani people to end the political crisis that has immobilized the coalition government for too long. I have long said that the central terrorist threat to the United States lies in northwest Pakistan and Afghanistan, and not Iraq. US policy must focus on assuring that all elements of Pakistan's government are resolute in shutting down the safe havens for al Qaeda and the Taliban. There can be no safe haven for terrorists who threaten the American people.
"A year ago, I advocated that the US move from a 'Musharraf policy' to a 'Pakistan policy.' I hope all of Pakistan's friends will now seize the opportunity created by Musharraf's exit to focus on the urgent issues of today: confronting the threat of extremist violence, dealing with food and energy shortages, and helping the Pakistani people build a stable, secure, democratic future."
"The resignation of President Pervez Musharraf is a step toward moving Pakistan onto a more stable political footing. Pakistan is a critical theater in countering the threat of al Qaeda and violent Islamic extremism, and I look forward to the government increasing its future cooperation.
"There are serious problems that must be addressed. The situation in Pakistan's frontier regions requires immediate and continued attention, and I hope that the elections for President Musharraf's successor will serve to reconcile the Pakistani people behind a leader who can solidify their government internally. It is critical that the United States continue to work in partnership with the Pakistani people and their democratically elected government to tackle the many challenges we both face."