The US Republican presidential candidate, John McCain, is attracting millions more dollars in funding than expected, which could allow him to match the much-vaunted Barack Obama donation machine.

He is on course to raise $400m (£201m) for the November election, which he said would put him roughly level with Obama. McCain surprised US political pundits by raising $22m in June, his best showing since he launched his bid for the White House early last year.

Obama remains favourite to win the election, with polls showing him on average five points ahead, but McCain is showing increasing signs of making a fight of it in spite of his lacklustre campaign so far.

Obama opted out of a public finance scheme - which provides $84.1m in federal funding to cover election expenses but sets that as a ceiling - in expectation of raising hundreds of millions more.

But he is suffering for several reasons: a failure so far to win over the big Democratic fundraisers who bankrolled Hillary Clinton's failed campaign for the nomination; an unwillingness of his supporters to help cancel Clinton's $23m debt; and, to a lesser extent, a creeping disillusionment among sections of the party grassroots with his recent shift from left to centre.

Obama's campaign team has yet to post its fundraising figures for June. His fundraising has been on a downward trend: he raised $55m in February, $41m in March, $31m in April and $22m in May. The June figures are expected to reverse that trend but still fall significantly short of the total needed to meet election budget needs.

Obama's campaign team said yesterday that a Wall Street Journal report that he had raised $30m in June - $20m less than expected - was "way off the mark". A spokesman, Dan Pfeiffer, said: "Some in the press still haven't realised that anyone who is talking about numbers doesn't know what our numbers are."

In addition to what he raises himself, McCain will have access to the funds of the cash-rich Republican party - about $68m - while Obama will have only modest help from the Democratic party, which has about $3m at its disposal.

Obama devoted much of this week to private fundraising events, courting in particular Clinton's wealthy supporters. Obama can return again and again to the small donors he has attracted on the internet but needs the big donors as well. "It's one of the reasons why the Clinton people are so important," Kirk Wagar, Obama's Florida finance chairman, told the Washington Post. "Most of us have beaten our Rolodexes [contact lists] pretty badly."

Obama is hoping to raise about $500m - $300m for himself and the rest for the Democrats fighting for seats in Congress.