SALT LAKE CITY — Utah Gov. Gary Herbert had to undergo surgery to remove painful kidney stones but he and Lt. Gov. Spencer Cox got to make light of the situation on social media while Herbert was temporarily unable to serve as governor.

Cox temporarily assumed the powers and duties of governor for about two hours Friday evening while Herbert, a 70-year-old Republican, underwent surgery that Deputy Chief of Staff Paul Edwards says was successful.

Herbert said on Twitter before his surgery that Cox was “measuring for drapes” in Herbert’s office and Cox tweeted afterward that “the peaceful transfer of power has occurred.”

While he was temporarily governor, Cox declared his wife as “the first lady of my heart” and he proposed that Utah Jazz forward Joe Ingles be Cox’s own lieutenant governor.