President Barack Obama speaks to members of the military and their families during a Christmas dinner in Anderson Hall at Marine Corps Base Hawaii in Kaneohe Bay, Hawaii. Jewel Samad/AFP/Getty

President Barack Obama on Thursday signed a compromise budget that reduces the risk of another government shutdown and a defense bill that cracks down on sexual assault in the military and smooths the path for transferring detainees from the U.S. prison in Guantanamo Bay, Cuba.

The two-year U.S. budget agreement, negotiated by Congress earlier this month, and the National Defense Authorization Act for fiscal 2014 were among seven pieces of legislation signed by Obama, who is on holiday with his family in Hawaii.

The U.S. Senate passed the budget deal on Dec. 18 to ease automatic spending cuts and reduce the risk of a government shutdown. It was negotiated by Democratic Sen. Patty Murray of Washington and Paul Ryan, Republican from Wisconsin.

Obama at that time praised the measure — the first budget agreed to by a divided Congress since 2009 — saying it was "a good first step away from the shortsighted, crisis-driven decision-making that has only served to act as a drag on our economy." He did not comment further on Thursday.

The Senate approved the annual defense policy bill on Dec. 20, one of its final actions before leaving for the Christmas break.

The act authorizes a Pentagon base budget of $526.8 billion in the 2014 fiscal year. That amount will have to be reconciled early in the new year with the $498 billion agreed to in the budget deal.

The wide-ranging bill also included several measures to reform the way the military justice system responds to sexual assaults among members of the military and boosts the Pentagon's ability to help destroy Syria's chemical weapons.

The bill also makes it easier for the White House to transfer prisoners from the military prison in Guantanamo Bay to countries willing to accept them.

The budget accord set federal government spending levels for two years. It ended, at least for the time being, three years of bitter bipartisan warfare over spending, taxes and Obama's health care law that twice brought the nation to the brink of defaulting on its debt.

Widely viewed as a modest deal, it blunts the effect of automatic "sequestration" spending cuts by allowing spending to rise by $63 billion over scheduled levels in fiscal 2014 and 2015.

The accord was hailed as a rare example of bipartisan compromise and came after Congress' approval ratings sank to historic lows because of seemingly never-ending brinkmanship over spending and taxes.

The deal avoids raising taxes, an important goal for Republicans, and provides more funding for education and other domestic programs championed by Democrats.

It raises revenues by increasing airport security fees, trimming federal retirement benefits and curtailing some military pensions.

However, the pact omits an extension of long-term unemployment benefits favored by Obama. A projected 1.3 million people will lose extended unemployment benefits when they expire on Saturday.

It also leaves for lawmakers to work out an increase in the federal debt ceiling, which, if left unchanged at its current $16.7 trillion level, could again put the United States at risk of default.

Without new spending authority, the federal government could partially shut down on Jan. 15, as it did for 16 days in October when Republicans sought to tie spending legislation to delays or cutbacks in the president's signature Affordable Care Act health care law, also known as Obamacare.

The administration has warned Congress that the government could run out of borrowing authority as soon as February if lawmakers do not raise the debt limit.

Reuters