NEW YORK (CBSNewYork) — Mayor Bill de Blasio and Gov. Andrew Cuomo joined together late Friday to pen an op-ed taking Ted Cruz to task for his remarks on “New York values” – after Cruz denounced both of them in remarks earlier in the day.

The mayor and governor came together to defend New York City and New York state, after Cruz made repeated comments attacking “New York values” and took both the mayor and the governor to task personally for their policy decision and for controversies in local politics.

In the op-ed, published late Friday in the New York Daily News, the mayor and governor said Cruz was far out of line.

“In a misguided attempt to profit from the politics of division, he has decided to write off and vilify a city of 8.5 million people and a state of 20 million,” they wrote. “That’s wrong — no matter what party you’re in.”

Cuomo and de Blasio went on to write of Cruz, “For someone who has so much hostility toward our city and state, he spends an awful lot of time begging for money from our residents.” They wrote that Federal Election Commission data showed Cruz had raised nearly $500,000 from New York donors just this election cycle.

During the Republican presidential debate on Friday, Cruz said Republican frontrunner Donald Trump embodied “New York values,” and went on to say, “the values in New York City are socially liberal or pro-abortion or pro- gay-marriage, focus around money and the media.”

Trump himself defended New York at the debate, and a day later, Cuomo and de Blasio, along with high-profile Republicans such as Rep. Peter King (R-N.Y.) and former Mayor Rudolph Giuliani, all took Cruz to task. Cuomo said earlier in the day, “I think he owes New Yorkers an apology, not that we want it or we would accept it.”

“You’re right. Donald Trump and Hillary Clinton and Andrew Cuomo and Bill de Blasio have all demanded an apology, and I’m happy to apologize. I apologize to the millions of New Yorkers that have been let down by liberal politicians in that state,” Cruz said.

Cruz then attacked Cuomo’s policies, including the governor’s stance against hydraulic fracturing for natural gas, and in favor of same-sex marriage rights, abortion rights and gun control.

“I apologize to the hardworking men and women in the state of New York who have been denied jobs because Governor Cuomo won’t allow fracking even though there’s been many high-paying jobs just south in Pennsylvania. New Yorkers are denied the ability to provide for their families,” Cruz said. “I apologize to all the pro-life and pro-marriage and pro-Second Amendment New Yorkers who were told by Governor Cuomo that they have no place in New York, because that’s who New Yorkers are.”

Cruz went on to attack Mayor de Blasio for a variety of policies and controversies, including claims that de Blasio did not support police officers.

In late 2014, Patrolmen’s Benevolent Association Pat Lynch and other critics accused de Blasio of taking the side of protesters after a grand jury declined to indict Officer Daniel Pantaleo in the police-involved death of Eric Garner. Thousands of officers went on to turn their backs on the mayor at the funerals of officers Rafael Ramos and Wenjian Liu, who were shot and killed in an ambush attack in Brooklyn.

“I apologize to all the cops, and the firefighters and 9/11 heroes who had no choice but to stand and turn their backs on Mayor de Blasio, because Mayor de Blasio over and over again stands with the looters and criminals rather than the brave men and women in blue,” Cruz said.

In their op-ed, Cuomo and de Blasio took umbrage to Cruz’s tone in what he had called his apology.

“If he had any class or possessed true presidential timber, Ted Cruz would offer New Yorkers a real apology instead of sarcasm — not because we need it, but to prove he’s not a hypocrite. His rhetoric this week is unfit for anyone who hopes to lead the American people,” they wrote.

In local political headlines over the past year, Cuomo and de Blasio have been known to feud with one another.

Last year, de Blasio took Cuomo to task after his requests for such provisions as tougher rent regulations permanent mayoral control of city schools were refused in Albany, saying Cuomo was seeking to undermine the city’s agenda and doling out political retribution. Cuomo responded that de Blasio didn’t know how to play the game in Albany where, unlike New York City, there are Republicans.

And just this past fall, Cuomo slammed de Blasio for his proposal on helping to curb the city’s homelessness crisis.

But in their op-ed, they wrote jointly to discuss what they thought “New York values” really meant.

“Hate is never an acceptable political tool. And in New York, we reject those who seek to use it for personal gain. Instead, we welcome people of all backgrounds, and we embrace immigrants with open arms,” Cuomo and de Blasio wrote. “We have forged one city, one state, and one family. Throughout our nation’s history, New York has been the gateway to opportunity and the driver of the American Dream — both for people born here, and those born on other shores who come here to achieve that magnificent Dream.”

They also emphasized how resiliency New Yorkers had worked to overcome and move ahead in the face of horror and tragedy, from the terrorist attacks of Sept. 11, 2001, to Superstorm Sandy in 2012.

De Blasio and Cuomo went on to invoke the words of 19th-cenutry New York poet Emma Lazarus, whose poem, “The New Colossus” is inscribed at the bottom of the Statue of Liberty:

“Give me your tired, your poor,
Your huddled masses yearning to breathe free,
The wretched refuse of your teeming shore.
Send these, the homeless, tempest-tost to me,
I lift my lamp beside the golden door!”

“Those are New York values. Acceptance. Compassion. Tolerance. Resilience. Equality,” Cuomo and de Blasio wrote. “The principles that built the greatest nation on the earth, and that continue to help guide it today.”

During the debate Thursday night, Trump defended his home state following Cruz’s remarks — saying he found the comment “insulting” and talked about how New Yorkers came together after the 9/11 terror attacks.

“When the World Trade Center came down, I saw something that no place on Earth could have handled more beautifully, more humanely than New York,” he said. “We rebuilt downtown Manhattan, and everybody in the world watched and everybody in the world loved New York and loved New Yorkers. And I have to tell you, that was a very insulting statement that Ted made.”

As CBS2’s Jessica Schneider reported, some New Yorkers said late Friday that they did not hear much of an apology in Cruz’s remarks about the mayor and governor – even though Cruz repeatedly used the word “apologize.”

“I think it’s insincere,” one man said. “I don’t think it necessarily makes things worse for him, because I don’t think people who are particularly sensible care about what he says.”

“I think that’s going to win him some political points in the GOP for him,” another man said.

According to the most recent filings, Cruz’s campaign has taken in about $487,000 from New York contributors through Sept. 30, the Associated Press reported.

But the AP reported that Robert Mercer, a Wall Street hedge fund mogul, contributed $11 million to a super PAC that supports Cruz last April.