Republican presidential candidate Ted Cruz apologized on Wednesday for making a joke about Democratic Vice President Joe Biden, whose son died on the weekend.

"It was a mistake to use an old joke about Vice President Biden during his time of grief, and I sincerely apologize," Cruz, a Texas senator seeking the 2016 Republican presidential nomination, wrote on Facebook.

"The loss of his son is heartbreaking and tragic, and our prayers are very much with the Vice President and his family."

U.S. media reported that Cruz had said on Wednesday in Michigan: "Joe Biden: You know what the nice thing is? You don't even need a punch line."

Beau Biden, a former Delaware attorney general, died on Saturday of brain cancer at age 46. President Barack Obama is to deliver the eulogy at a funeral Mass for Biden on Saturday in Wilmington, Delaware, the White House said on Tuesday.