Announcement expected Thursday morning

It’s coming down to the wire for Conan O’Brien.

As lawyers continued to haggle over final deal points — including compensation for soon-to-be-displaced “Tonight Show with Conan O’Brien” staffers — an exit agreement was pushed back another day late Wednesday.

Meanwhile, the late night wars got even nastier on Wednesday night, as friends-turned-rivals David Letterman and Jay Leno sharpened their knives and went after each other — as the gloves apparently have permanently come off.

Also, O’Brien put the finishing touches on his Friday night farewell episode, adding musical guest Neil Young to the lineup, which, as previously announced, includes Tom Hanks and Will Ferrell. (Thursday night’s second-to-late show features Robin Williams, who also appeared on Johnny Carson’s penultimate “Tonight Show.”)

In the case of O’Brien’s NBC exit, lawyers worked until 3 a.m. on Wednesday morning, attempting to wrap up the departure deal. An announcement is now expected for Thursday morning.

It’s believed that the final back-and-forth revolves around unsexy issues like tax implications of the exit deal.

Both sides are also ironing out ground rules on a disparagement clause in the agreement — in other words, how much fun can O’Brien poke at NBC and Leno (both on “The Tonight Show” and as a guest on other shows) until he returns to hosting a new talk show.

On recent editions of “The Tonight Show,” O’Brien has made light of what he can or can’t say about NBC going forward.

Insiders had earlier said most of the exit agreement’s larger points have been settled — although the two sides are giving two very different answers on whether O’Brien’s settlement would be offset by money he might make on that hypothetical new show.

O’Brien’s reps have said all along that the host’s exit agreement — believed to be as much as $40 million — included a “no offset” clause. NBC insiders, however, disagree, and say there is an offset built in the deal should he wind up at a new home like Fox.

Talks in recent days have also centered on severance packages for O’Brien’s “Tonight Show” staff.

Both sides had hoped to have a signed agreement days ago. With O’Brien’s final show expected to be taped on Friday, the clock is ticking in order to give him the opportunity to make a formal farewell. A Thursday announcement would allow O’Brien to promote the next night’s finale.

The controversy has been good for O’Brien’s ratings, as the host handily beat rival Letterman in the Tuesday night metered market ratings.

Over the past week, ratings for the “Tonight Show” are up by 50%,” O’Brien quipped on Wednesday’s “Tonight Show.” “When NBC executives heard this they told me, ‘See, you really don’t fit in around here.'”

Peacock execs would probably also like to put this affair behind them. As the controversy is drawn out, rivals like David Letterman continue to feel more emboldened in mocking NBC.

Quipped Letterman on Wednesday: “It’s one of those times of year in southern California when it’s raining like crazy out there in Los Angeles, and there’s flooding all over L.A., flooding everywhere. So I’m thinking to myself, ‘Whoa, it’s a good thing Conan O’Brien is getting sandbagged.'”

Letterman also continued going after Leno — and in one segment, “Jay Leno: A Look Back,” even accuses the host of stealing “The Tonight Show” from Johnny Carson.

Leno also fought back on Thursday’s “The Jay Leno Show.”

Letterman has been hammering me every night,” said Leno. “You know the best way to get Letterman to ignore you? Marry him.”

Follow @Variety on Twitter for breaking news, reviews and more