Labour MP Jo Cox is in a critical condition after she was shot in an attack in her constituency near Leeds.
An eyewitness said the 41-year-old mother of two was left lying in a pool of blood on the pavement after her assailant struck in Birstall, West Yorkshire.
Hichem Ben Abdallah said: "He was kicking her as she was lying on the floor."
He said that after a bystander intervened, the attacker produced a gun, stepped back and shot her twice.
West Yorkshire Police said a 52-year-old man has been arrested in connection with the attack, which happened near the town's library, where the MP holds her advice surgeries.
Abdallah, 56, was in the cafe next door to the library when he heard screaming and went outside.
He said: "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 added: "He was fighting with her and wrestling with her and then the gun went off twice and then she fell between two cars and I came and saw her bleeding on the floor."
After around 15 minutes, the shop owner said emergency services arrived and tended to her with a drip.
Cox's assistant confirmed she had been attacked and said he was trying to get more information from police at the scene.
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."
A police spokesman said: "At 12.53 today, police were called to a report of an incident on Market Street, Birstall, where a woman in her 40s had suffered serious injuries and is in a critical condition.
"A man in his late 40s to early 50s nearby also suffered slight injuries.
"Armed officers attended and a 52-year-old man was arrested in the area. There are no further details at present.
"Police presence in the area has been increased as a reassurance to the community."
Meanwhile, MPs and politicians, including Prime Minister David Cameron, Labour leader Jeremy Corbyn and former London mayor Boris Johnson, have been tweeting their support to the family.
Just heard the absolutely horrific news about the attack on Jo Cox MP. My thoughts are with Jo and her family
-- Boris Johnson (@BorisJohnson) June 16, 2016
Utterly shocked by the news of the attack on Jo Cox. The thoughts of the whole Labour Party are with her and her family at this time.
-- Jeremy Corbyn MP (@jeremycorbyn) June 16, 2016
Thoughts with Jo Cox MP her family and friends. This is dreadful news.
-- Anna Soubry MP (@Anna_Soubry) June 16, 2016
Very concerned about reports Jo Cox has been injured. Our thoughts and prayers are with Jo and her family.
-- UK Prime Minister (@Number10gov) June 16, 2016
Jo Cox not only a fantastic MP, she's also a great mate - please, please, please God let her be ok!
-- stellacreasy (@stellacreasy) June 16, 2016
All our thoughts and prayers are with Jo Cox and her family.
-- Hilary Benn (@hilarybennmp) June 16, 2016
Shocked to hear terrible news about brilliant MP and friend Jo Cox. Thinking of her and praying for her and family.
-- Sadiq Khan (@SadiqKhan) June 16, 2016
Shocked and appalled to hear about Jo Cox. All my thoughts with Jo and her family.
-- Zac Goldsmith (@ZacGoldsmith) June 16, 2016