Maximum prison terms for people found guilty of common assault against emergency workers are to double from six months to a year.
Firefighters, police officers, NHS staff and anyone who is attacked while assisting an emergency worker are among those covered by the new law.
Justice Minister Rory Stewart said staff deserve greater protection.
The Assaults on Emergency Workers (Offences) Bill receives Royal Assent later and comes into force in November.
Judges will also have to consider tougher sentences for more serious offences such as GBH and sexual assault, if the victim is an emergency worker – this also includes prison officers and search and rescue services.
The Ministry of Justice said there had been more than 26,000 assaults on police officers in the past year and 17,000 assaults on NHS staff.
There has also been an increase in assaults on prison officers and firefighters, it said.
Labour MP Chris Bryant, who presented the private members’ bill, said the “growing tide of attacks” on emergency staff was a “national scandal”.
“All too often attackers get away with little more than a slap on the wrist,” he said.
“I hope this new law will help put a stop to that attitude.”
Mr Bryant, the MP for Rhondda, has said there are 20 assaults on emergency staff in Wales every day.
Jane Carroll, a senior Royal College of Nursing officer, told the BBC that she was attacked while out on a home visit.
“He was circling me and shouting at me and as I opened the door two hands came very hard on my back. I fell over and took the skin off my knees,” she said.
“I sat in my car and cried for a little while but realised I couldn’t stay there because I felt vulnerable.”
“When you go into your shift you don’t expect to have to deal with the police,” she added.
“It’s not appropriate to have that disruption, but to do what you have to do, sometimes you have to call on them.”
“This is not just about doing the right thing by our crews and making sure that people treat our crews with respect, this also impacts on our ability to get to the next patient,” Garrett Emmerson, from the London Ambulance Service, told the BBC.
“And with the service as busy as it is today, over 5,000 calls a day, then that has a real tangible effect on our ability to treat and care for patients across London.”
Mr Stewart said: “Assaulting prison officers or any emergency worker is not just an isolated attack, it represents violence against the public as a whole.”
Kim Sunley, national officer at the Royal College of Nursing, said: “Physical assaults remain a fact of life for many healthcare workers, from A&E to community services.
“This bill is the first step towards changing that for good.”
Professor Jane Cummings, chief nursing officer for England, said: “We have a zero tolerance policy when it comes to deliberate threats, abuse or violence made to any NHS staff.
“This behaviour from patients or members of the public will never be tolerated and should rightly be reported to the police.”