Congressional leaders said Wednesday they have reached an agreement on a two-year budget deal, charting a path out of the long-running turmoil over spending and immigration that culminated in a government shutdown last month.

The agreement raises federal spending by almost $300 billion over two years above limits imposed by a 2011 budget law. If approved by the GOP-controlled Congress, the deal would mark the triumph of defense hawks, who have pushed for higher military spending, over the dwindling number of conservatives focused on reducing the federal budget deficit.

The budget deal would raise military spending by $80 billion through the rest of fiscal year, which runs through September, and by $85 billion in fiscal year 2019, according to a congressional aide familiar with the agreement.

Congressional leaders also agreed to raise nondefense spending by $63 billion in this fiscal year and $68 billion the following year, according to the aide, addressing demands from Democrats, who had pushed for boosting domestic spending.