Talk about multitasking. An Oklahoma man married his longtime girlfriend moments after being sentenced to prison on gun charges.

Oklahoma County Judge Jerry Bass sentenced Larry Austin to four years in federal prison on the firearm charges, then minutes later performed the marriage ceremony, according to The Associated Press.

Austin and his girlfriend, Dustie Dawn Trojack, had obtained a marriage license earlier in the day accompanied by two sheriff's deputies.

Trojack's two children attended the short ceremony, and the pair was able to share a kiss before Austin was whisked away by federal authorities, The Oklahoman reported.

It was a first for Bass.

"It’s what we do as judges," he told The Oklahoman. "We conduct legal business, and from time to time we conduct marriages."