As the details of DeMarcus Lawrence's long-awaited mega deal with the Cowboys emerged Friday evening, the defensive end responded to a tweet noting that team owner Jerry Jones had finally secured his "war daddy" pass rusher.

"GUESS SO," Lawrence tweeted.

All it took to get it done, after negotiations had reached a standstill late last month: $105 million over five years, with $65 million guaranteed and paid over the first three seasons, sources said. Lawrence will get a $25 million signing bonus and $31.1 million in 2019 -- the highest first-year payout for a non-quarterback, according to NFL.com.

The mind-boggling money actually falls comfortably in line with what the Cowboys always knew they were going to have to pay to keep the well-rounded Lawrence, who is now the third-highest paid edge rusher in the NFL in guaranteed money behind Khalil Mack and Von Miller.

Also key for Dallas: Lawrence can go ahead with surgery to repair a torn labrum, which is now tentatively targeted for Wednesday, according to sources. He had been waiting as negotiations dragged on, with the Cowboys placing a second-straight franchise tag on him March 4, starting the clock on a July 15 deadline to reach a long-term deal.

Recovery time is expected to take 3-4 months, which puts Lawrence on track to be ready for the season.

The waiting and hand-wringing won't carry on through this month's NFL draft and the looming offseason organized team activities and minicamp.

Back in 2015, the Cowboys didn't hammer out a lucrative extension for franchise-tagged former receiver Dez Bryant until the eve of training camp.

And with Tank off the to-do list, long-term, hefty extensions for quarterback Dak Prescott and receiver Amari Cooper move to the forefront. More Pro Bowlers -- running back Ezekiel Elliott and cornerback Byron Jones -- are also in line for extensions.

Reaching terms with Lawrence slices off nearly $9.5 million in salary cap room from what the Cowboys had set aside for the franchise tag on the 2019 cap.

Word surfaced Friday afternoon that the Cowboys and Lawrence's side were again engaged. A discussion between executive vice president Stephen Jones and Lawrence on Thursday, sources said, helped pave the way to a deal.

But both sides wanted it done, and the figures match projections.

The average of $21 million a year is just over the $20.5 Lawrence would've been paid on the franchise tag this season. The guaranteed money is above the $56 million Detroit defensive end Trey Flowers received and below what elite players Mack and Miller earned -- the sweet spot for Lawrence.

Lawrence made it clear he did not intend to play on a franchise tag for a second-straight season. David Canter, his agent, said in October that he hoped the Cowboys would take care of Lawrence the way they said they would.

The Cowboys did, in this case living up to their premise of rewarding homegrown players who earn it.

Lawrence, a 2014 second-round draft pick, had played nice when the Cowboys tagged him the first time, relishing last season's $17.1 million salary instead of complaining about a lack of security.

And he did everything the team asked, putting up his second double-digit sack season in a row. He played his second full season after coming off two back surgeries. He played through the shoulder injury, defended the run well and established his role as a team leader.

He made his second-straight Pro Bowl, and his 10.5 sacks made him the first Dallas player to post double-digit sacks in consecutive seasons since DeMarcus Ware from 2007-11.

The defense became the team's strength in 2018, and the Cowboys can't regress if they are to finally advance past the divisional round of the playoffs for the first time since 1995.

Lawrence will lead one of the best defensive lines in defensive coordinator Rod Marinelli's Dallas tenure. The Cowboys traded for Robert Quinn to pair with Lawrence. They extended defensive end Randy Gregory, though he is suspended indefinitely.

Staff writers Jon Machota and David Moore contributed to this report.

Editor's note: This story has been updated with specifics on Lawrence's shoulder surgery.

Twitter: @khairopoulos