OXFORD, Mississippi (Reuters) - Republican John McCain ended the suspense and said he will attend the first of three debates with Democrat Barack Obama on Friday, setting up a showdown that could help decide a tight White House race.

McCain had vowed to skip the debate if negotiations were not completed on a $700 billion rescue of the U.S. financial industry but his campaign said in a statement that enough progress had been made to participate in the 9 p.m. EDT (0100 GMT) debate.

“The McCain campaign is resuming all activities and the senator will travel to the debate this afternoon,” the statement said. McCain, an Arizona senator, will head back to Washington after the debate and return to the negotiations.

Obama was on his campaign plane in Washington preparing for the flight to Mississippi when the announcement about McCain was made at midday.

The debate is scheduled to focus on foreign policy and national security, although the turmoil on Wall Street has dominated the campaign trail for nearly two weeks and is almost certain to be discussed.

Both candidates spent Thursday night in Washington and conferred with congressional leaders on Friday morning before bailout negotiations resumed.

White House talks between McCain, Obama and congressional leaders ended in disarray on Thursday with no agreement on a stalled $700 billion bailout plan proposed by the Bush administration.

Republican presidential nominee Senator John McCain speaks at the Clinton Global Initiative Annual Meeting in New York September 25, 2008. REUTERS/Brian Snyder

Both candidates said progress had been made and they were optimistic an accord could be reached, but the two campaigns accused each other of injecting politics into the process.

“Barack Obama’s priority was political posturing,” the McCain campaign said in its statement about the negotiations.

Obama told reporters on his campaign plane just before McCain’s announcement that the White House meeting was not “as productive as it could have been.”

“EXPLAIN WHAT IS GOING ON”

“My strong sense is that the best thing I can do, rather than to inject presidential politics into some delicate negotiations, is to go down to Mississippi and explain to the American people what is going on,” Obama said.

McCain’s decision to participate was a relief to organizers at the National Commission on Debates and the hosts at the University of Mississippi, which spent about $5 million to accommodate the event, and the 3,000 journalists who descended on Oxford to cover it.

The first debate was expected to be watched by far more than the 40 million Americans who saw the convention acceptance speeches of McCain and Obama, and could be a crucial factor for undecided voters in the November 4 election.

Public opinion polls have shown Obama making gains over the past week on the question of who could best lead the country on economic issues, and most polls have him holding a slight lead over McCain.

Both camps have worked to lower expectations for their candidates in the high-stakes confrontation.

Obama aides have noted that national security and foreign policy is a strength for McCain, a 26-year veteran of Congress and a former prisoner of war in Vietnam. Opinion polls show voters favor McCain on security issues.

Earlier this week, McCain anticipated a tough debate by citing Obama’s soaring rhetoric on the campaign trail and his victory in the Democratic nominating battle over Sen. Hillary Clinton of New York.

“He’s very, very good. He was able to defeat Senator Hillary Clinton, who as we all know is very accomplished,” McCain said earlier this week at an Ohio campaign stop. “He was able to, I think, with his eloquence inspire a great number of Americans. So these are going to be tough debates.”

The second presidential debate is scheduled for October 7 and a third on October 15. The two vice presidential candidates -- Palin and Democratic Sen. Joe Biden of Delaware -- will debate on October 2.