Republican presidential candidate Ted Cruz on Wednesday apologized for the timing of a joke he made on the campaign trail at the expense of Vice President Joe Biden, whose son Beau had died on Saturday.

"It was a mistake to use an old joke about Joe Biden during his time of grief, and I sincerely apologize," the Texas senator said in a statement posted on social media. "The loss of his son is heartbreaking and tragic, and our prayers are very much with the vice president and his family," the 44-year-old father of two added.

Cruz had appeared earlier on Wednesday at an event in Howell, Michigan, and employed a punch line he has been using in speeches on the stump, the Associated Press detailed. "Vice President Joe Biden ... You know the nice thing? You don't need a punch line," the senator had quipped.

While the remark is not "particularly stinging" in and of itself as it draws on Biden's image as a gaffe-prone member of the Obama administration, "it's problematic in current circumstances," the Christian Science Monitor judged.

The death of Beau Biden, the vice president's eldest son, was announced on Saturday. The former Delaware attorney general had been suffering from brain cancer and leaves behind a wife and two young children.

The Biden family on Thursday was welcoming residents who wished to pay their respects at the Legislative Hall in Dover, Delaware. Public commemorations were scheduled to include a Friday viewing at St. Anthony of Padua Church in Wilmington, as well as a Saturday funeral Mass, at which President Barack Obama will deliver a eulogy, the AP detailed.

The Cruz incident, meanwhile, illustrates that "politics can be a hard, even brutal game" and that "the campaign trail produces robotic behavior," the Christian Science Monitor analyzed. The Washington Post, however, praised the senator for his unequivocal apology.

"Most (politicians) have also been told repeatedly by political operatives and strategists that apologies only extend a story," the newspaper noted. "But Cruz said simply what so many others have not: It was a mistake. I'm sorry. Enough said."