The Brooklyn debate that Hillary Clinton and Bernie Sanders have been squabbling over for the last week is finally a go.

The Sanders campaign announced this evening that it had accepted an offer from CNN to debate on the evening of April 14 - a date that Clinton had been pushing for but the senator rejected.

CNN separately announced that the primetime smackdown would be held from 9-11 PM next Thursday at the Duggal Greenhouse at the Brooklyn Navy Yard.

Wolf Blitzer will moderate, the network said, and NY1 will join as a partner.

Intense: Democratic presidential candidate Hillary Clinton speaks during a rally at Cohoes High School on Monday, April 4, 2016, in Cohoes, New York

Support: U.S. Democratic presidential candidate Hillary Clinton raises arms with U.S. Senator Kirsten Gillibrand (right) and U.S. Representative Paul Tonko (left) at a campaign rally in Cohoes

Sanders' campaign said this morning it could not do April 14, though it originally said would be acceptable, because it was the only evening it could secure a permit for a Washington Square rally in New York City.

Clinton backer and New York City Mayor Bill de Blasio then offered to wield his power to settle the boiling dispute between the Democratic presidential candidates today.

De Blasio said on Twitter: 'Let's make @NY1 4/14 BKLYN debate happen. @BernieSanders: I'll help you secure any permit you need to ensure your NYC rally can happen too.'

The Sanders campaign said in a release committing to the debate that it was able to move the rally to Wednesday, April 13, ending the scheduling conflict.

The Brooklyn debate that Hillary Clinton and Bernie Sanders have been squabbling over for the last week is finally a go

Campaign officials for Clinton have told Sanders to 'stop playing games' after his camp rejected three dates for a debate ahead of the New York primary. Clinton, a former senator from New York, is seen her today in New York City with Governor Andrew Mario Cuomo

Hillary Clinton backer and New York City Mayor Bill de Blasio offered to wield his power to settle a dispute between the Democratic presidential candidates today

'We hope the debate will be worth the inconvenience for thousands of New Yorkers who were planning to attend our rally on Thursday but will have to change their schedules to accommodate Secretary Clinton’s jam-packed, high-dollar, coast-to-coast schedule of fundraisers all over the country,' said Sanders spokesman Michael Briggs.

Clinton's press secretary, Brian Fallon, subsequently declared on the social media platform that the jab was 'Classy!' and told a reporter, 'Sanders could have had this same outcome days ago. But hey, at least it is resolved.'

He also said de Blasio 'gets MVP award for his generous offer of assistance to help @BernieSanders get to yes on April 14 debate in Brooklyn.'

Briggs contended in his release that it was his opponent who actually caved, saying, 'Sen. Sanders has accepted another invitation to debate Hillary Clinton in New York. We are glad that she finally has agreed.'

'Sanders all along has pressed for a debate on television in prime time so the greatest number of New Yorkers and Americans may listen to the candidates and decide for themselves who has the best ideas about how to reform our rigged economy and the corrupt campaign finance system,' he said.

He further pointed out that Clinton would have preferred to debate in upstate New York rather than Brooklyn.

Both camps had said today that they expected an agreement of some sort.

Clinton said in an interview that aired on Good Morning American. 'I want to debate, and I'm confident that we can work out a time to do that.'

On CNN's New Day, top Sanders aide Tad Devine said, 'Hopefully we can find a way to come to an agreement for a time for the debates so a lot of people, the maximum number of people, can hear both candidates.'

One finally came about, but not without another day's worth of public bickering between the campaigns.

Devine said the campaign was expecting a 'massive crowd' at the April 14 event and had instead agreed to the four nights prior, including this Sunday, April 10, a proposed date for an NBC News and Telemundo debate.

A website that tracks Clinton campaign events has her in Virginia that night at a BBQ hosted by Virginia Governor Terry McAuliffe and his wife Dorthy.

She has fundraisers on Monday in New York and Tuesday in Florida, it showed.

Her schedule on Wednesday and Thursday remained open, suggesting the possibility of a debate on April 13, one of the days favored by the Sanders campaign.

Clinton has meanwhile agreed to an April 15 debate on Good Morning America.

'I'll be there,' she said this morning on the program, saying the alternative venue provides a good opportunity for the campaigns to reach an audience apart from those who watch the evening debates.

The Sanders campaign didn't want to do an a morning event, though.

'We would prefer to have a prime time debate,' Devine said this morning on CNN.

He said that was an already agreed upon point by the campaigns - future debates would take place during prime time.

'They have fundraisers, we have rallies, OK? I know we're both busy,' he said, emphasizing his candidate's ability to draw large crowds. 'Maybe they can move a fundraiser.'

Sanders' campaign says it is expecting a 'massive crowd' at an April 14 event and had instead agreed to the four nights prior, including this Sunday, April 10, a proposed date for an NBC News and Telemundo debate. He's seen here in Janesville, Wisconsin, this morning

Clinton and Sanders had been arguing about when and where to debate in New York this month before the April 19 primary with each side proposing dates the other campaign turned down.

Frustrated Clinton campaign aides told Sanders to 'stop playing games' this weekend over the proposed Democratic debate in New York before the state's primary in two weeks and change.

According to Clinton's team, Sanders staffers rejected three proposed dates for the event, despite earlier calling the opposing team out for failing to commit.

Fallon told CBS: 'The Sanders campaign needs to stop using the New York primary as a playground for political games and attacks against Hillary Clinton.

'The voters of New York deserve better. Senator Sanders and his team should stop the delays and accept a debate on April 14 or the morning of April 15th.'

Fallon says the Clinton campaign also proposed the night of April 4 as a possible date for the event but this too was brushed aside.

Meanwhile Briggs, a spokesman for the Sanders campaign, accused the Hillary camp of proposing dates and times that 'don't make much sense.'

Briggs pointed at the the final of NCAA's March Madness tournament is due to be played on April 4, posing a huge scheduling conflict with any potential debate.

'The idea that they want a debate in New York on a night of the NCAA finals -- with Syracuse in the tournament no less -- is ludicrous,' he added.

Briggs said the Sanders campaign has also offered dates to Clinton which they had rejected.

Fallon denied that the April 4 debate would create a conflict with the basketball match, saying the Clinton campaign proposed a start time that would have ended the event well before tip-off.

Asked earlier if he was worried Clinton was no longer willing to debate him, Sanders said: 'Yeah, I do have a little bit of concern about that. But I would like to see a debate in New York state.'

A spokesman for Sanders indicated later on MSNBC that the matter had not been resolved yet, however

Debates between Clinton and Sanders have become a hot-button issue in the Democratic race.

After the Sanders campaign publicly bashed Clinton for backtracking on the April debate, her pollster said she would not participate in any further televised matches with Sanders until he 'changed his tone'.

The remark was widely ridiculed online, with the witty hashtag 'tonedownforwhat' trending on Twitter.

Sanders supporters pointed out that, compared to the Republican race, Clinton has had a relatively easy time. Sanders has mostly stuck to the issues and has ducked questions about Clinton's emails. He'a also avoided personal attacks.

Clinton has become increasingly irritated with Sanders' accusations over her campaign financing, particularly her links to large Wall Street firms and oil companies, however.

On Friday Clinton was filmed telling a Greenpeace protester who challenged her over the links: 'I'm so sick! I'm so sick of the Sanders' campaign lying about this, I'm sick of it.'

During a stump speech later in Wisconsin, Sanders ordered Hillary to apologize over the remark, saying his campaign are 'telling the truth'.

New York goes to the polls on April 19 in a hotly-anticipated contest between the native Brooklynite and the state's former U.S. senator.