Image copyright AP Image caption Teenagers riding a captured Iraqi army vehicle in Tikrit on Wednesday

The UK will not be getting militarily involved in Iraq, despite Islamist militants gaining control of more of the country, William Hague has said.

The Foreign Secretary said the UK was considering sending humanitarian aid from "our very large" budget.

But militarily "it is for the Iraqi leadership primarily to respond".

Deputy PM Nick Clegg also opposes action, referring to the 2003 war: "I don't think having made one mistake you repeat it by making a second one."

Mr Hague told the BBC: "We're very concerned about the hundreds of thousands of people who have been displaced, and with our very large humanitarian budget we may be in a position to assist with that, and we're looking at that now.

"But we will not be getting involved militarily. We will support the United States in anything that they decide to do, we're in consultation with them. But I stress again it is for the Iraqi leadership primarily to respond to this."

Labour leader Ed Miliband said UK military intervention in Iraq was "not on the table" and said he did not think it would be right.

"We have got to give all the non-military support we can to the Iraqi government to help them, but I don't think there is any question of going back into Iraq militarily," he told the BBC.

Earlier Deputy Prime Minister Nick Clegg said he did not believe Western forces should go back into Iraq.

Mr Clegg said the violence in Iraq was a "very, very dangerous situation" and showed how destructive the knock-on effects of the civil war in Syria were.

Mr Clegg told his LBC phone-in that his personal view was that the legal basis for the invasion of Iraq in 2003 was "very shaky".

Militant enclave

The leader of the Lib Dems, the junior party in the UK's coalition government and a party which opposed the 2003 US-led invasion of Iraq, said "I personally do not think legality was ever proved."

He said this was not the government's view, but his personal view and said his party, which was led by Charles Kennedy at the time, had stood alone in saying the UK should not have invaded in the first place.

The US says it is considering giving further assistance to Iraq in fighting Islamist militants who have taken control of a large swathe of territory in eastern Syria and western and central Iraq.

The Sunni Muslim insurgents, led by an al-Qaeda offshoot called the Islamic State of Iraq and the Levant (ISIS), have been consolidating positions in Tikrit, Saddam Hussein's hometown, which they took on Wednesday, after capturing Mosul, Iraq's second city.

They want to set up a Sunni militant enclave straddling the border.

An ISIS spokesman has called on fighters to march on Baghdad and southern cities where the country's majority Shia Muslim community, which the group regards as "infidels", are concentrated.

The UN Security Council has condemned the attacks in Mosul and Tikrit - saying that the humanitarian situation around Mosul, where up to 500,000 people have fled, is "dire and worsening by the moment".

ISIS in Iraq

The Islamic State of Iraq and the Levant (ISIS) has 3,000 to 5,000 fighters, and grew out of an al-Qaeda-linked organisation in Iraq

ISIS has exploited the standoff between the Iraqi government and the minority Sunni Arab community, which complains that Shia PM Nouri Maliki is monopolising power

It has already taken over Ramadi and Falluja, but taking over Mosul is a far greater feat than anything the movement has achieved so far, and will send shockwaves throughout the region

The organisation is led by Abu Bakr al-Baghdadi - an obscure figure regarded as a battlefield commander and tactician. He was once the leader of al-Qaeda in Iraq, one of the groups that later became ISIS.

Critical test ahead for Iraq

Six things that went wrong for Iraq

How did Iraqi militants take over Mosul?

In pictures: Iraq cities attacked