Media playback is unsupported on your device Media caption The BBC's Gareth Gordon: "Stormont is possibly once more slipping into dangerous waters"

Northern Ireland's controversial Welfare Reform Bill has failed to pass at Stormont.

The nationalist Sinn Féin and SDLP made a petition of concern, a blocking mechanism that meant it did not get the required cross-community support.

Alliance Party leader David Ford said it meant the Stormont institutions were "in a very dangerous position".

The DUP now wants the government to take back welfare powers, but Sinn Féin said such a move would be unacceptable.

Mr Ford said it's not clear what will happen next.

"Within the next couple of weeks we have to resolve the budget issue, not just the June monitoring round - the reallocation between departments in year - but actually to pass the bill to allow departments to spend money in the second half of the financial year," he said.

"So that's a measure of the crisis we're in, that has to be resolved and it's unclear at this stage how that will be resolved."

A majority of 58 assembly members voted in favour and 39 voted against the bill to make changes to benefits that have been introduced in the rest of the UK.

There were several mitigation schemes in the bill that would have lessened its impact.

But Deputy First Minister Martin McGuinness of Sinn Féin said: "This is a time when the (Stormont) executive parties need to stand together to defend our public services, particularly in terms of health, education and welfare."

Green Party leader Steven Agnew also signed the petition.

During the assembly debate, Finance Minister Arlene Foster warned that if the bill failed to pass, "£604m of cuts would have to be made to vital, frontline public services, the services that the most vulnerable in our community need and rely upon".

The debate went ahead despite Northern Ireland First Minister Peter Robinson's admission to hospital with a suspected heart attack on Monday.

DUP sources say the 66-year-old party leader is making good progress and has been given a full briefing on Tuesday's events at Stormont.

Last week, Mr Robinson said the assembly could not survive the scenario that would unfold if the welfare reform bill was not approved.

However, Sinn Féin accused the DUP of scaremongering with its budget forecasts.

The Northern Ireland parties had agreed a deal on Westminster's welfare reform measures in the Stormont House Agreement last December.

However, Sinn Féin withdrew its support in March.

What is a petition of concern?

The measure was designed as a way to safeguard minority rights in Stormont's power-sharing assembly.

If a petition of concern is presented to the assembly speaker, any motion or amendment will need cross-community support.

In such cases, a vote on proposed legislation will only pass if supported by a weighted majority (60%) of members voting, including at least 40% of each of the nationalist and unionist designations present and voting.

Effectively this means that, provided enough MLAs from a particular community agree, that community can exercise a veto over the assembly's decisions.