A National Guardsman who spent the last seven months in Afghanistan has managed to make it home just in time to receive his master’s degree – and a standing ovation – at a graduation ceremony in Georgia.

Lt. Daniel McLaughlin, who walked across the stage at Kennesaw State University Thursday night, was able to cut his deployment short by a few weeks and catch a cargo flight back to America, Fox5 Atlanta reports. He then was given a 48-hour leave to collect his masters of science in information technology.

"I didn't think that was gonna happen," McLaughlin, who completed his coursework online while overseas, told the station. "I was thinking about maybe ordering myself a gown and just taking a pic overseas or something.

"With that flight coming in, it was just truly an amazing thing to actually be here and walk in person after all that hard work and late nights," he added.

EX-ISRAELI MILITARY SOLDIER TELLS FLASHER 'I’M GOING TO GET YOU DARLING'

McLaughlin’s wife, children and in-laws attended the event, which brought the entire auditorium to its feet in applause when his presence was recognized, Fox5 Atlanta reports.

CLICK HERE TO GET FOX NEWS APP

"Lt. McLaughlin just flew in last week, and while he is technically still deployed, he has made a special trip to Kennesaw State tonight to accept his degree,” University President Pamela Whitten said.