A man has been charged with murder in connection with the shooting of Labour MP Jo Cox.

Mrs Cox, 41, was attacked in the street outside her constituency surgery in Birstall, near Leeds, at lunchtime on Thursday.

READ MORE: Jo Cox murder: Watch as Nicola Sturgeon and Kezia Dugdale pay their respects at Glasgow vigil

West Yorkshire Police said Thomas Mair, of Birstall, has been charged with murder, grievous bodily harm, possession of a firearm with intent to commit an indictable offence and possession of an offensive weapon.

The 52-year-old will appear at Westminster Magistrates' Court on Saturday.

West Yorkshire Police Temporary Chief Constable Dee Collins said on Friday that a 77-year-old man remains in a stable condition in hospital after he was injured when he "bravely intervened" in an effort to help Mrs Cox.

Vigils were held across the UK on Friday evening as members of the public and politicians came together to lay flowers, light candles and stand in silence in memory of Mrs Cox.

The vigils followed a joint visit to her home town by David Cameron and Jeremy Corbyn, where the Prime Minister issued a plea for tolerance in British politics.

READ MORE: Jo Cox murder: Watch as Nicola Sturgeon and Kezia Dugdale pay their respects at Glasgow vigil

The Prime Minister said the whole nation was "rightly shocked" at Mrs Cox's death, and called for people to "value, and see as precious, the democracy we have on these islands". Politics is about public service and MPs want to "make the world a better place", he said.

Labour leader Mr Corbyn described Mrs Cox was "an exceptional, wonderful, very talented woman, taken from us in her early 40s when she had so much to give and so much of her life ahead of her".

Downing Street confirmed that a female MP wrote to Mr Cameron last year raising concerns about the safety of her colleagues and attacks on her personally.

READ MORE: Jo Cox murder: Watch as Nicola Sturgeon and Kezia Dugdale pay their respects at Glasgow vigil

A statement from Number 10 said: "The Prime Minister replied to the letter and voiced deep concern about the attacks she had suffered. The Prime Minister added that he would raise the issue with the Home Secretary. The Prime Minister also spoke to the MP about her concerns.

"The Home Secretary wrote to the MP as well and voiced her 'deep concern about the appalling incidents'. The Home Secretary also wrote to the chief constable of the MP's local police force and urged the police to 'do everything in their power' to deal with the incidents. The Home Secretary also met the MP at the end of last year."

In January, a new security package for MPs was unveiled with additional funding. Downing Street said this covered security measures at MPs' homes - in London and their constituencies - as well as constituency offices.

Chris Bryant, shadow leader of the House of Commons, told BBC Newsnight he had warned Westminster authorities about "inadequate protection in their constituencies".

He said: "I've said in terms an MP will be shot. This will happen. And the truth is we all know we can't guarantee that something like this won't happen again but we need to make sure that we've taken all the proper precautions."

More than £200,000 was raised on Friday evening on a fundraising page set up by friends of Mrs Cox to support three charities "closest to her heart".

President Barack Obama phoned Mrs Cox's husband from Air Force One and offered his condolences.

"The president noted that the world is a better place because of her selfless service to others, and that there can be no justification for this heinous crime, which robbed a family, a community and a nation of a dedicated wife, mother and public servant," a White House statement said.

The Remain and Vote Leave sides have suspended national campaigning in light of the death of Mrs Cox, who entered Parliament as MP for Batley and Spen in last year's general election.

Conservatives and Liberal Democrats have announced that they will not contest the by-election resulting from her death, giving Labour a probable free run at retaining the Westminster seat which she won with a majority of 6,057.

In an apparent reference to the EU referendum campaign, German chancellor Angela Merkel urged British politicians to "draw limits" around the language used in political debate, warning that otherwise "radicalisation will become unstoppable".

The National Police Chiefs' Council said forces are contacting MPs around the country to give security advice.

Defiant MPs have vowed to go ahead with constituency surgeries after the horrific murder.

Parliament is to be recalled on Monday to allow MPs to pay tribute to Mrs Cox.