London (CNN) British politician Jo Cox died in a street attack on Thursday, a brazen and startling assault in a country where attacks on politicians are extremely rare and the slaying of a lawmaker is without parallel in recent history.

Described as a rising star of the opposition Labour Party, the 41-year-old is the first British lawmaker to be killed in office since Conservative MP Ian Gow was assassinated by the IRA in a 1990 car bombing.

Cox was shot and stabbed in Birstall, near Leeds in northern England, the Press Association news service reported, citing eyewitnesses.

She died as a result of her injuries. She had just finished a regular public meeting with constituents and came out of the meeting on her own. British politicians at her level are rarely if ever accompanied a security detail.

Her colleagues took the news of the death hard.

Alison McGovern, a Labour Party politician, praised Cox's influence and cited her role as a leading campaigner seeking a solution to the Syrian conflict.

"Not everyone gets to Westminster to represent their hometown and makes the impact that she has," referring to the House of Commons.

Many constituents were dumbfounded and distraught over the death.

"Dreadful, dreadful. Poor girl," one constituent said. "For the first time in many many years we actually had an MP that was interested in Birstall, and interested in us, and interested in the people and the businesses here."

After the assault, a man was detained close to the scene of the attack, said Dee Collins, Temporary Chief Constable of West Yorkshire Police. Weapons, including a firearm, were recovered, she said.

The Press Association said West Yorkshire Police have detained Tommy Mair, 52, for questioning in connection to the shooting.

Witness: Attacker yelled 'Put Britain first'

Police have not commented on the circumstances surrounding the attack and a motive wasn't immediately clear.

But one witness, Clarke Rothwell, who runs a cafe near the crime scene, told 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."

The gunman fired three shots, the final one at Cox's head, he told the Press Association.

Photos: British politician killed in attack British Prime Minister David Cameron, center, joins other political leaders in paying their respects to slain Parliament member Jo Cox on Friday, June 17. Cox, 41, was stabbed and shot in Birstall, England, after a meeting with her constituents. A 52-year old man, Tommy Mair, is being held in police custody in connection with her death. Hide Caption 1 of 12 Photos: British politician killed in attack Police search Mair's home in Birstall on June 17. Hide Caption 2 of 12 Photos: British politician killed in attack People view tributes at Parliament Square in London on June 17. Hide Caption 3 of 12 Photos: British politician killed in attack Flowers and personal messages are seen on Parliament Square on June 17. Hide Caption 4 of 12 Photos: British politician killed in attack Parliament member Yvette Cooper, left, embraces Bishop Nick Baines after attending a Birstall vigil for Cox on Thursday, June 16. Hide Caption 5 of 12 Photos: British politician killed in attack People sign messages on Parliament Square on June 16. Hide Caption 6 of 12 Photos: British politician killed in attack Police gather near the scene of the attack in Birstall on June 16. Hide Caption 7 of 12 Photos: British politician killed in attack A forensics officer takes photos of items at the scene of the attack. Hide Caption 8 of 12 Photos: British politician killed in attack Cox was attacked outside the Birstall library after holding a regular public meeting with constituents, said Robert Light, a councilor from nearby Birkenshaw. Cox, a mother of two who represented Batley and Spen in Parliament, was elected in May 2015. Hide Caption 9 of 12 Photos: British politician killed in attack Police stand guard on the perimeter of the crime scene. Hide Caption 10 of 12 Photos: British politician killed in attack Police tape covers the area where Cox was attacked. Hide Caption 11 of 12 Photos: British politician killed in attack A member of the police forensics team works near the scene of the shooting. Hide Caption 12 of 12

Another witness, Hichem Ben Abdallah, said the attacker kicked Cox as she lay on the ground until a bystander intervened and the attacker produced a gun and shot her, the Press Association reported.

"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," Abdallah said.

The gunman was wrestling with Cox "and then the gun went off twice," Abdallah told the Press Association. "I came and saw her bleeding on the floor."

Footage circulated of a man on the ground after being apprehended by uniformed police officers.

At 1:48 p.m. local time, less than an hour after the attack, Cox was pronounced dead by a doctor working with a paramedic crew.

Police said no one else is being sought in relation to the attack. A 77-year-old man was assaulted after the attack on Cox, but his injuries were not life-threatening, Collins said.

Police search house of Tommy Mair

West Yorkshire police were seen searching Mair's home in Birstall on Thursday evening. A neighbor, who asked not to be identified, said Mair lived in the house being searched.

Police had the house cordoned off and could be seen coming and going.

The neighbor said she was questioned by police and asked if she knew Mair, and whether she had any information about him.

She said there did not seem anything wrong with him, that he seemed to like gardening and also tended to other neighbors' gardens.

Mair, she said, lives alone and had lived in the house a long time. She didn't believe he had a regular job and she said she would see him around at odd hours.

Tensions high in Britain ahead of referendum

The killing comes as the momentous and contentious public referendum on whether to stay or leave the European Union is just one week away, with passions running high and toxic political discourse elbowing out civil debate.

Parliament members have been the objects of public ire, accused of lying and making up their arguments on both sides of the debate.

Cox, elected a member of Parliament for Batley and Spen in Yorkshire last year, was a supporter of Britain voting to remain in the European Union.

Her husband and two young daughters were on a "Stronger In" boat campaigning on the River Thames on Wednesday, she tweeted at the time.

A photo posted to Jo Cox's official Twitter account shows Cox and her husband, Brandon. The images of the two children have been obscured.

Before entering Parliament, Cox worked for aid agency Oxfam and for a pro-European campaign organization, according to her website.

In the wake of the attack, campaign groups on both sides of the debate on next week's referendum announced they were halting their operations Thursday.

Britain First, a fringe nationalist political party that wants the nation to leave the European Union, issued a statement denying any connection to the attack in light of reports about the assailant's comments. The statement said the party "would never encourage behavior of this sort."

Nation mourns

The MP's husband, Brendan Cox , said her killing marked the "beginning of a new chapter in our lives."

"More difficult, more painful, less joyful, less full of love," he said.

"I and Jo's friends and family are going to work every moment of our lives to love and nurture our kids and to fight against the hate that killed Jo."

Vigils were held in Birstall and in Parliament Square, London, as people gathered to pay tribute to the slain politician.

#JoCox #Birstall flowers being laid in Market Square yards from where the MP so brutally murdered pic.twitter.com/nqmJsl77w0 — Nic Robertson (@NicRobertsonCNN) June 16, 2016

British Prime Minister David Cameron, who canceled a scheduled "Stronger In" pro-EU rally in Gibraltar on Thursday after the attack, described the killing as "dreadful, dreadful news."

"She had a huge heart. She was a very compassionate, caring MP. She was a bright star -- no doubt about it. A star for her constituents, a star in Parliament, and a star right across the House."

The death of Jo Cox is a tragedy. She was a committed and caring MP. My thoughts are with her husband Brendan and her two young children. — David Cameron (@David_Cameron) June 16, 2016

Labour Leader Jeremy Corbyn said the whole country would be in shock at the "horrific murder" of a politician he said was "universally liked at Westminster."

"Jo Cox died doing her public duty at the heart of our democracy, listening to and representing the people she was elected to serve. It is a profoundly important cause for us all," he said in a statement.

London Mayor Sadiq Khan paid tribute to Cox, writing on Facebook that in her year as an MP, "she made more impact than others make in a whole parliamentary career."

JUST WATCHED British politician: Jo Cox was courageous Replay More Videos ... MUST WATCH British politician: Jo Cox was courageous 03:07

"Everyone who met Jo knew she was special. I knew her from her time as a fearless campaigner working on behalf of some of the world's poorest and most marginalized people," he wrote.

"I knew that she would bring all her passion for social justice and equality to Parliament and fight just as hard for her own community in Westminster as she has for so many others around the world."

Fellow Labour MP Mike Gapes described her as a rising star in the party, "one of the most effective of the newly elected Labour MPs last year."

"She's had a big impact already," Gapes said. "She's been one of the most outspoken people calling for more to be done to stop (Syrian President Bashar al-Assad's) barrel bombing in Syria and to get humanitarian corridors to help for the refugees from Syria."

U.S. State Department spokesman John Kirby said, "We are shocked and appalled that a member of the UK Parliament, Ms. Jo Cox, was murdered today in Birstall, near Leeds, in northern England, while doing her public duty. "

French President Francois Hollande expressed "deep emotion after the murder" and passed along his condolences and solidarity with the British people.

UK politician Jo Cox in critical condition after attack. Scene photos from @ScotsFootyCards https://t.co/8wxh3ThIKL pic.twitter.com/Fh04rH1dhG — CNN iReport (@cnnireport) June 16, 2016

Forensic police examine the scene of the attack.

Attack has similarities to shooting of U.S. congresswoman

U.S. Rep. Gabby Giffords, then 40, was shot in the head at a "Congress on Your Corner" constituent event outside an Arizona grocery store.

Absolutely sickened to hear of the assassination of Jo Cox. She was young, courageous, and hardworking. A rising star, mother, and wife. — Gabrielle Giffords (@GabbyGiffords) June 16, 2016

Giffords, the main target of gunman Jared Lee Loughner, survived, but six people were killed. Giffords was hospitalized in critical condition and spent months recovering.

She returned to the floor of the House of Representatives seven months after the attack. But in 2012, she announced her resignation to focus on her health and recovery. She continues to struggle with the effects of the shooting

Today's shooting resonated for Giffords and she commented on it in a statement.

"I don't remember the constituent meeting where I was shot in the head and nearly lost my life, but the scores of such events I and so many others have hosted represent the importance of a democracy connected to its citizens. Just like January 8, 2011, did not deter America from its founding ideals, the British principle of pluralism and the nation's democratic institutions will endure," Giffords said.