Rep. Alexandria Ocasio-Cortez, Democrat of New York, sharply criticized Ivanka Trump over the weekend for participating in meetings with foreign leaders when she has no foreign policy background. And former White House press secretary Sarah Sanders swooped in to defend President Trump's legacy.

Ivanka Trump, a top aide to her father, not only accompanied Mr. Trump to the G20 but took part in meetings with foreign leaders. Ocasio-Cortez, responding to a video posted to Twitter that appeared to picture the Trump daughter trying to jump into a conversation with outgoing British Prime Minister Theresa May, Canadian Prime Minister Justin Trudeau and French President Emmanuel Macron.

"It may be shocking to some, but being someone's daughter actually isn't a career qualification," Ocasio-Cortez tweeted. "It hurts our diplomatic standing when the President phones it in & the world moves on. The US needs our President working the G20. Bringing a qualified diplomat couldn't hurt either."

Get Breaking News Delivered to Your Inbox

Former White House press secretary Sarah Sanders, whose final day in the administration was Friday, came to the defense of the Trump presidency and Ivanka Trump.

"Phoning it in @AOC is wasting your time on Twitter while destroying jobs in NY," Sanders tweeted. "@realDonaldTrump & @IvankaTrump actually created millions of new jobs and continue to make the US stronger on the global stage but thank you for reminding Americans everyday why they elected Trump."

Mr. Trump has also claimed his daughter has created millions of jobs, although there is no evidence for that.

Mr. Trump returned Sunday night from his trip to Asia, where he became the first president to walk into North Korean territory. He met with North Korean strongman Kim Jong Un for 50 minutes, although the details of that meeting have yet to be released.

Ivanka Trump and her husband Jared Kushner also set foot on North Korean soil.