The man police have detained in connection with the death of MP Jo Cox is believed to have been born in Scotland.

The Labour MP died after being shot and stabbed in the street outside her constituency advice surgery.

The mother of two children aged three and five was attacked by a man reportedly shouting "Britain first" at lunchtime on Thursday in Birstall, West Yorkshire.

READ MORE: Jo Cox killing: Shock after MP dies after being shot and stabbed in the street

Eyewitnesses said he kicked and stabbed her and then shot her several times, the final shot aimed at her head.

The alleged gunman has been named locally as Tommy Mair and is understood to have been born in Kilmarnock.

Neighbours of Mair, 52, have described him as "a loner".

He was arrested near the scene soon after the attack.

The Herald:

Eyewitness Clarke Rothwell, who runs a cafe near the murder scene, described the attack, telling the Press Association: "He was shouting 'put Britain first'. He shouted it about two or three times. He said it before he shot her and after he shot her."

He said the gunman fired three shots, the final one at her head.

Britain First is the name of a far-Right group which said it was "not involved and would never encourage behaviour of this sort".

READ MORE: Jo Cox killing: Shock after MP dies after being shot and stabbed in the street

Another witness, Hichem Ben Abdallah said the alleged attacker was "kicking her as she was lying on the floor".

He said that after a bystander intervened, the man produced a gun, stepped back and shot Ms Cox.

The 56-year-old, who was in the cafe next door to the library, told the Press Association: "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.

"He was fighting with her and wrestling with her and then the gun went off twice."

READ MORE: Jo Cox killing: Shock after MP dies after being shot and stabbed in the street

He added: "I came and saw her bleeding on the floor."

Mr Abdallah said the weapon looked handmade and that the man who had been wrestling with the assailant continued to do so even after he saw 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 and he was pulling her by her hair."

Mair's house was sealed off by police who were guarding the property as forensic officers worked in the garden.

Neighbours said he had lived there for more than 30 years - on his own for the last two decades since the deaths of his mother and grandmother.

They did not think he had a job or drove a car and described how he would do gardening chores for local people.

READ MORE: Jo Cox killing: Shock after MP dies after being shot and stabbed in the street

One neighbour, David Pickles, said: "He's lived there longer than me and I've lived here since 1975.

"I still can't believe it. He's the last guy I would have thought of.

"He's just quiet. He kept himself to himself."

He added: "I've never seen a lot of people visiting or anything like that, but he likes gardening.

"He did a lot of people's gardens round here. But he did it quietly."

Another neighbour, who did not want to be named, said: "I've known him since I was young.

READ MORE: Jo Cox killing: Shock after MP dies after being shot and stabbed in the street

"He lived with his grandmother in that house, she died a few years ago.

"He was a bit of a loner. It's a bit of a shock - he did everyone's gardens.

"I can't say a wrong word about him, he was so quiet.

"It's come as a shock to everybody."

Leah Ainley, who lives in Risedale Avenue where Mair was arrested, said armed police surrounded him and pinned him to the ground.

"I just saw them take him down and catch him," she added.

"The police were armed. There were more than 10 of them at the end.

"I just looked out the window and saw them. The man was white and bald. He banged his head on the floor.

"He just lay on the floor while they were holding him down.

"He had a bag with him but that's all I saw, I didn't see if he was armed."

Ms Cox was elected to the seat of Batley and Spen at the last general election in 2015.

She was a Remain supporter in the referendum and both official campaigns have suspended their operations as a mark of respect following the attack on her.

She has two children with husband Brendan, who shortly after the attack Tweeted a picture of her next to the River Thames, where they lived in a houseboat.

She graduated from Cambridge University in 1995 and worked as an adviser for former Labour prime minister Gordon Brown's wife, Sarah, and Baroness Kinnock.

Ms Cox was a vocal advocate for the victims of the Syrian civil war and abstained in last autumn's contentious vote on allowing British military action in Syria.

Mr Cox, a former advisor to ex-Prime Minister Gordon Brown, spent Wednesday campaigning for the UK to remain in the EU.

He posted photographs of himself and the couple's children travelling along the Thames in a dinghy during a counter-protest against a pro-Brexit flotilla of vessels.