The assault took place outside Portsmouth Jami Mosque at around 21:30 BST on 31 August, according to Hampshire and Isle of Wight Constabulary.
The victim, who had been praying with a group of men, women, and children, was verbally abused before being punched in the chest.
Police said the attacker also made threats with a knife, which was later recovered at the scene. No serious injuries were reported.
The offender, Callum Mcinally, 29, of Waverley Road in Southsea, pleaded guilty at his first hearing on 2 September to charges of racially or religiously aggravated assault, harassment, and threatening a person with a blade in a public place. He was sentenced to 20 months in prison.
Read More:
The Crown Prosecution Service (CPS) said in a statement that it would “continue to act swiftly and robustly regarding these cases.”
The attack comes against the backdrop of rising hate crimes and far-right activity in the UK. Mosques and minority-owned businesses have been targeted in a series of recent incidents.
On 28 August, the South Essex Islamic Centre in Basildon was vandalised with red crosses and graffiti, including slogans such as “Christ is King.” Local council leader Gavin Callaghan condemned the act, calling it “scum behaviour” that brought shame on the town.
Source: Agencies