Despite taking a drastic turn on his own immigration policies, Marco Rubio ironically called out Donald Trump for flip-flopping in his stance on immigration reform.

While speaking to Fox News on Wednesday, Rubio slammed Trump for his record on immigration and accused the billionaire businessman of taking a hardline approach to the issue "just to run for president," reports Politico.

"Well, first of all, Donald was a supporter of amnesty and the DREAM Act, he changed his position on those issues just to run for president," the Florida senator said on Fox News' "America's Newsroom."

Although it's true Trump has adopted a tough approach on immigration that includes building a wall on the U.S.-Mexico border and deporting all 11 million undocumented immigrants, it should be noted Rubio has also changed his tone on immigration since deciding to run for president. Not only was Rubio once a strong advocate for comprehensive immigration reform earlier in his political career, but he also helped write and advocate for immigration reform legislation in 2013 that would have included a pathway to citizenship for undocumented residents. House Republicans, however, criticized the bipartisan Senate bill and blocked it from being presented on the House floor for a vote.

Shortly thereafter, Rubio changed his own stance on immigration and began to stray away from his own bill. In addition, the freshman senator came out against President Barack Obama's Deferred Action for Childhood Arrivals (DACA) program, which protects "DREAMers" from deportation, in spite of the fact that he was once a DREAM ACT supporter, reports MSNBC.

"It will have to end at some point," the Republican candidate said after a campaign event in New Hampshire, referring to federal protections for undocumented immigrants whose parents brought them into the country.

"This program's now been around for three years, and we haven't signed it by now. ... We're not going to extend the program," Rubio said, according to Politico.

"DACA is going to end. The ideal way for it to end would be it's replaced by a reform system that creates an alternative, but if it doesn't it will end. It cannot be the permanent policy of the United States."