WASHINGTON — President Donald Trump on Tuesday seized on an error by liberal activists who tweeted photos of young-looking immigrants at the U.S.-Mexico border in steel cages and blamed the current administration for separating immigrant children from their parents.

The photos were taken by The Associated Press in 2014, when President Barack Obama was in office. The photo captions reference children who crossed the border as unaccompanied minors.

Early Tuesday, Trump tweeted: “Democrats mistakenly tweet 2014 pictures from Obama’s term showing children from the Border in steel cages. They thought it was recent pictures in order to make us look bad, but backfires. Dems must agree to Wall and new Border Protection for good of country…Bipartisan Bill!”

The immigration debate has reached a fever pitch in recent months after reports that about 700 children crossing the U.S.-Mexico border have been separated from their parents since October.

The number of separated minors is expected to jump once Trump’s new “zero tolerance” policy is enacted. That policy, embraced by Attorney General Jeff Sessions, would enforce criminal charges against people crossing the border illegally with few or no previous offenses. Under U.S. protocol, if parents are jailed, their children would be separated from them.

Democrats mistakenly tweet 2014 pictures from Obama’s term showing children from the Border in steel cages. They thought it was recent pictures in order to make us look bad, but backfires. Dems must agree to Wall and new Border Protection for good of country...Bipartisan Bill! — Donald J. Trump (@realDonaldTrump) May 29, 2018

Enter a June 2014 online story by The Arizona Republic titled “First peek: Immigrant children flood detention center.”

The story linked to photos taken by AP’s Ross D. Franklin at a center run by the Customs and Border Protection Agency in Nogales, Arizona. One photo shows two unidentified female detainees sleeping in a holding cell. The caption references U.S. efforts to process 47,000 unaccompanied children at the Nogales center and another one in Brownsville, Texas.

How or why the story resurfaced on social media four years after it was published is unclear. But among those who took notice was Jon Favreau, Obama’s former speechwriter.

In a now-deleted tweet, Favreau wrote: “This is happening right now, and the only debate that matters is how we force our government to get these kids back to their families as fast as humanly possible.”

Other liberal activists also linked to the Arizona Republic story using the hashtag “WhereAreOurChildren,” which grew out of testimony in April by a federal official that the U.S. government had lost track of nearly 1,500 unaccompanied minor children it placed with adult sponsors in the U.S.

Favreau did not immediately respond to a phone call seeking comment. But he later issued a corrected tweet: “These awful pictures are from 2014 when the government’s challenge was reconnecting unaccompanied minors.”

He added: “Today, in 2018, the government is CREATING unaccompanied minors by tearing them away from family at the border.”

As the immigration debate lit up social media over the weekend, Trump on Saturday falsely claimed that “we have to break up families” at the border because “the Democrats gave us that law.”

That’s not true. There’s no law mandating that parents must be separated from their children. But if an administration opts to impose harsh criminal charges against an adult for crossing the border illegally, their children would be separated from them as a result.

Homeland Security Secretary Kirstjen Nielsen has defended the Trump administration’s practice of separating children from parents when the family is being prosecuted for entering the U.S. illegally, telling a Senate committee earlier this month that removing children from parents facing criminal charges happens “in the United States every day.”

A 2008 law, passed unanimously by Congress and signed into law by President George W. Bush, says children traveling alone from countries other than Mexico or Canada must be released in the “least restrictive setting” — often to family or a government-run shelter — while their cases slowly wind through immigration court. It was designed to accommodate an influx of children fleeing to the U.S. from Central America.