Sir John Chilcot today said that he had invited Gordon Brown to give evidence to the Iraq inquiry "as a matter of fairness".

The inquiry chairman said that Brown, David Miliband, the foreign secretary, and Douglas Alexander, the international development secretary, would be appearing within the next couple of months.

Chilcot also repeated his assertion that he wanted the inquiry to stay "outside party politics". This was the reason he gave before Christmas for his original decision not to invite Brown, Miliband and Alexander to give evidence before the general election.

Brown and his two colleagues were originally given special treatment because they are due to be questioned on decisions about Iraq they have taken in their current jobs.

Jack Straw, the justice secretary, gave evidence yesterday because the inquiry wanted to ask him about what he did in a previous post, when he was foreign secretary.

In a brief statement at the start of today's hearing, Chilcot did not give a full explanation as to why he had changed his mind. But the opposition parties have insisted that Brown should give evidence before the election and Brown has said that he is willing to appear before polling day, and the inquiry appears to have concluded that postponing the session could give an advantage to Brown's opponents.

Chilcot said: "The prime minister wrote to me earlier this week saying he was prepared to give evidence whenever we saw fit. In my reply to the prime minister yesterday evening, I said as a matter of fairness the committee concluded we should offer the prime minister, if he wishes to take it up, the opportunity for him [and Miliband and Alexander] to attend hearings before the general elections."

Brown has said he believes that he has "nothing to fear, nothing to hide and nothing to lose" from appearing.

Dates are now being arranged for Brown's appearance. The inquiry had planned to conclude its evidence-gathering sessions on Monday 8 February, but Brown and his two colleagues will appear towards the end of that month, or at the beginning of March, to allow them time to prepare.

Nick Clegg, who led calls for Brown to give evidence before the inquiry, welcomed the news.

"It is well known that the prime minister was a key figure in Britain's decision to invade Iraq. It is only right that Gordon Brown should explain his role in this disastrous foreign policy failure before asking the British people for their vote," the Liberal Democrat leader said.

David Cameron, the Tory leader, said the prime minister had questions to answer about his role as chancellor and it was right he should be answering them before the election.

"I think he's made the right decision. I think he should give evidence to this committee," Cameron said on a visit to a community centre in Gillingham, Kent.

"If we had had our way, it would have been set up ages ago."

Cameron claimed the inquiry had only been held because the Tories "kept the pressure up".

"We should be learning the lessons about Iraq and one of the lessons about what went wrong is about the commitment that the government made," Cameron said.

"He [Brown] was chancellor of the exchequer at the time. He's got some important questions to answer and I'm glad they are going to be asked, and I hope answered, before the general election."

Sir Menzies Campbell, the former Lib Dem leader, said Brown had "bowed to the inevitable".

"It would have been incomprehensible to the general public if he had not been called to give evidence before the election along with other members of the cabinet at the time of the decision to take military action against Iraq, like Geoff Hoon and Jack Straw."

Angus Robertson, the SNP leader at Westminster who raised the issue at question time on Wednesday, said: "The net is closing in on Gordon Brown.

"Despite all his efforts to force the Iraq inquiry behind closed doors, the case for the man who bankrolled the illegal war in Iraq to give full evidence in public is overwhelming – and now even he has acknowledged that.

"Tony Blair led us into the worst foreign policy disaster in modern times and, as senior figures involved in the run-up to the conflict have already told the Chilcot inquiry, Gordon Brown was right beside him all the way.

"The truth of illegal invasion must be known before voters go to the polls at the general election. The people deserve the whole truth about a war fought in their name but the full facts cannot be known until Gordon Brown is held to account for his actions."

Although Brown has not featured heavily in testimony so far, some former members of the military have claimed the Treasury did not fund the development of southern Iraq sufficiently, leaving British civil administrators overly dependent on US funding.

Hoon, the former defence secretary, also alleged that the Treasury forced the Ministry of Defence to cut spending on helicopters after discovering the MoD was capitalising on a change in accounting practices.

Straw said yesterday he believed he discussed with Brown his secret contingency plans for British troops not to join the invasion in 2003, and for British co-operation with the US to be confined to providing intelligence, logistics and access to UK bases. It is not known whether that discussion did happen, how Brown viewed Straw's suggestions or indeed whether the then-chancellor supported the war at the time.

Brown has in recent weeks insisted he did support the war, but has said the post-war planning was inadequate.

Clare Short, the former international development secretary, alleged in her autobiography that Brown had doubts and feared that, if the war succeeded, the chancellor would be sacked by Blair.