Representative Alexandria Ocasio-Cortez, the firebrand political star known for using her social media savvy to champion her progressive policies, has apologized to a former elected leader from Brooklyn who sued her for blocking him on Twitter.

“I have reconsidered my decision to block Dov Hikind from my Twitter account,” Ms. Ocasio-Cortez, a Democrat from New York, said in a statement released on Monday. “Mr. Hikind has a First Amendment right to express his views and should not be blocked for them.”

The apology was made as part of a settlement agreement in the lawsuit, which was filed by Mr. Hikind in July after a federal appeals panel ruled that President Trump, one of Ms. Ocasio-Cortez’s frequent detractors, had violated the Constitution when he blocked people from following him on Twitter after they criticized him.

The three-judge panel said that because Mr. Trump used his Twitter account to conduct government business, he could not bar some Americans from reading his posts or interacting with them.