A video has gone viral showing the heartwarming moment a Coast Guard dad dressed as a mascot to surprise his daughter at school.

The dad, a Coast Guard sergeant, had just returned from seven months of active duty.

He called into Stephen Decatur Middle School in Berlin, Maryland where his daughter is a student, on Monday.

The Coast Guard sergeant's daughter Madi waves enthusiastically at the mascot not knowing it is her dad who has come to give her a surprise at school

Unsuspecting Madi high fives her dad who has just returned from seven months active duty abroad

He wasn't wearing regular clothes though.

Vice Principal Marcus Shipley suggested to the dad that he might like to surprise his daughter by dressing up in the school's bulldog mascot costume, as reported by ABC News.

The video shows him walking around the school cafeteria in the brown and white fur dog costume. He waves and high fives students who are having lunch.

He then high fives his unsuspecting daughter Madi before removing the bulldog head to show his face underneath.

He then removes the bulldog mascot head to show his daughter her dad's back

The other students clap and cheer as father and daughter hug making up for the time apart

She puts her hand over her mouth in amazement as her dad lifts her from the ground.

The other students clap and cheer as father and daughter hug making up for the time apart.