Image copyright PA Image caption Jo Cox was the Labour MP for Batley and Spen

An MP has died after she was shot and stabbed in a "horrific" assault in her constituency, police have said.

Jo Cox, Labour MP for Batley and Spen, was left bleeding on the ground after the attack in Birstall, West Yorkshire. A man was arrested nearby.

One eyewitness told the BBC they heard her attacker shout "put Britain first" at least twice beforehand.

Tributes flooded in from politicians including David Cameron, Jeremy Corbyn and US Secretary of State John Kerry.

Mrs Cox's husband Brendan said she would want people "to unite to fight against the hatred that killed her."

Vote Leave and Remain have both suspended campaigning in the EU referendum in light of the attack.

Mrs Cox, 41, is the first sitting MP to be killed since 1990, when Ian Gow was the last in a string of politicians to die at the hands of Northern Irish terror groups.

The man taken into custody was arrested in Market Street, not far from Birstall Library where Mrs Cox was holding a constituency surgery. He has been named locally as Tommy Mair.

Hundreds of Mrs Cox's friends and colleagues gathered for a vigil at St Peter's Church in Birstall earlier.

Every pew was full as people packed into the church for the emotional service.

MPs including Yvette Cooper hugged and consoled each other as it ended.

Media playback is unsupported on your device Media caption Police confirmed the death of the MP for Batley and Spen at a news briefing

Image copyright BBC Sport Image caption Police said a man was arrested in Market Street near the scene of the attack in Birstall

Labour leader Mr Corbyn said the country would be "in shock at the horrific murder", describing the MP as a "much loved colleague".

He added: "Jo died doing her public duty at the heart of our democracy, listening to and representing the people she was elected to serve.

"In the coming days there will be questions to answer about how and why she died.

"But for now all our thoughts are with Jo's husband Brendan and their two young children. They will grow up without their mum, but can be immensely proud of what she did, what she achieved and what she stood for."

From the church vigil: Olivia Richwald, BBC Look North

Image copyright Reuters

St. Peter's is a short but wide church and tonight every pew is full.

The vicar says this is a vigil of quietness. A candle with a small flame has been lit in memory of Jo Cox. People of all faiths have their heads bowed. So many are here they're shoulder to shoulder and standing at the back and the sides.

Some stifle silent tears, a lot hold tissues to their faces. The mood is one of shock and almost unbearable sadness.

A Buckingham Palace spokesman said the Queen will write privately to Mr Cox.

Cafe owner Clarke Rothwell, who witnessed the attack, said he heard a "loud popping noise that sounded like a balloon burst - a loud balloon."

Media playback is unsupported on your device Media caption Eyewitness Clarke Rothwell says he saw a man holding a gun and shouting "Britain first or put Britain first"

Image copyright Reuters Image caption A large police cordon was set up after the attack

Image copyright Reuters Image caption Floral tributes left by well-wishers were taken inside the police cordon by officers

"When I looked round there's a man stood there in his 50s with a white baseball cap on and a jacket with a gun, an old fashioned looking gun in his hand," he said.

"He shot this lady once and then he shot her again, he fell to the floor, leant over shot her once more in the face area.

"Somebody tried to grab him, wrestling with him and then he wielded a knife, like a hunting knife, just started lunging at her with a knife half a dozen times. People were screaming and running from the area."

Image caption Mrs Cox was attacked outside her constituency surgery at Birstall Library

Image copyright AFP Image caption A house in Birstall was also being searched by officers

Eyewitness Hithem Ben Abdallah, 56, was in a cafe next door to the library shortly after 13:00 BST when he heard screaming and went outside.

"There was a guy who was being very brave and another guy with a white baseball cap who he was trying to control and the man in the baseball cap suddenly pulled a gun from his bag."

After a brief scuffle, he said the man stepped back and the MP became involved.

Mr Abdallah said the weapon "looked handmade" and a man who had been wrestling with the gunman continued even after seeing the gun.

He said: "The man stepped back with the gun and fired it and then he fired a second shot, as he was firing he was looking down at the ground.

"He was kicking her as she was lying on the floor," he said.

Image copyright AFP/Getty Image caption MPs left floral tributes in Parliament Square

Image copyright Reuters Image caption Constituents left messages to Mrs Cox around the statue

Brendan Cox has since tweeted a picture of his wife standing by the side of the River Thames in London.

David Cameron also tweeted to express his condolences.

US Secretary of State Mr Kerry said: "It is an assault on everybody who cares about and has faith in democracy."

Leeds North East MP Fabian Hamilton said he had known Mrs Cox since before she became an MP.

Mr Hamilton said: "I'm just completely devastated, I know Birstall reasonably well, and I think we're all totally shocked."

Huddersfield MP Barry Sheerman said he was "absolutely stunned". "I was a mentor to her," he said.

"She was the same age as my daughter. She was one of the real talents in parliament, people loved her in the constituency."

Image caption Armed police were posted outside Leeds General Infirmary

Ms Cox, who was born in Batley, was elected in 2015.

She was educated at Heckmondwike Grammar School who have issued a statement saying staff and pupils were "deeply shocked and saddened".

The school, it said, was proud of her contribution to local and national democracy and of her "determined, caring campaigning for the world's disadvantaged."

Mrs Cox graduated from Cambridge University in 1995 and went on to become head of policy at Oxfam.

Mark Goldring, the charity's chief executive, said: "Oxfam is deeply shocked to hear the news. Our thoughts and sympathies are with Jo and her family at this difficult time."