Coast Guard dad dressed as a mascot surprises his daughter in Maryland middle school

The dad had been on active duty for seven months before returning home.

A video showing a Maryland dad dressed as a school mascot to surprise his daughter is going viral.

The dad, a Coast Guard sergeant who had just returned from seven months of active duty last month, called the girl's school on his way home, Lynn Barton, the principal at Stephen Decatur Middle School in Berlin, said Monday.

It "was definitely a feel-good moment for all of us," she said in an email to ABC News.

When the father made it to the school, Vice Principal Marcus Shipley thought it'd be a good idea for the dad to the surprise his daughter dressed in the school’s bulldog mascot costume.

In the video, the mascot is seen walking around the noisy cafeteria, waving at and high-fiving students before approaching his daughter Madi, who was having lunch with her friends.

The playful mascot taps Madi on her shoulder and reveals his face. Madi is visibly shocked and excitedly jumps to give her father a hug, as delighted students clap and cheer around them.

"There was lots of applause and tears," Barton said.

The hug lasted at least 20 seconds.