When Sen. Marco Rubio was in the Florida House, he teamed up with his scandal-plagued pal David Rivera to co-sponsor legislation that would allow undocumented immigrants to pay in-state tuition rates.

This issue combines the dual ghosts of Rubio’s past, both of which he is trying to escape as he navigates his way through a tough GOP presidential primary: his relationship with Rivera, a former congressman under investigation as the alleged mastermind of a campaign finance scheme; and his record on immigration, which his fellow presidential contenders have criticized for being insufficiently tough.

The immigration issue has become especially important in the Republican field: This week’s political coverage was dominated by discussion over GOP frontrunner Donald Trump’s first commercial, which depicted illegal immigrants streaming over the border. After the last Republican debate, Rubio and Sen. Ted Cruz spent days trading barbs over who was telling the truth about the other’s immigration record.

It’s not the first time the immigration issue has proven to be a vulnerability for major presidential candidates: in the 2012 and 2016 election cycles, former Gov. Rick Perry was savaged for allowing undocumented immigrants to pay in-state tuition in Texas. Mitt Romney, in his attempts to appear tough on illegal immigration, talked up his plans for “self-deportation,” which sounded about as far-fetched then as Donald Trump’s plans for a Mexican-funded wall on the border seem today.

But for Rubio, the immigration issue looms particularly large. Rubio’s reputation as a politician was in part shaped by his participation in the bipartisan “Gang of Eight,” which sought to pass comprehensive immigration reform in 2013.

Rubio has since distanced himself from the immigration reform effort he once championed. But back in 2003 and 2004, he was even more generous to undocumented immigrants. Rubio and Rivera co-sponsored legislation that would have allowed undocumented immigrants to pay in-state tuition in community colleges and state universities.

Those who resided in the state and attended a Florida high school for three years prior to graduation would be able to pay in-state tuition, the legislation proposed, if the student pledged to file an application to be a U.S. permanent resident as soon as he or she is able to do so.

The legislation would not be adopted in 2003 or 2004, but was part of a years-long effort that continued well beyond Rubio’s time in the state legislature. Ultimately, in 2014, Republican Gov. Rick Scott signed into law an initiative that would allow undocumented immigrants to pay in-state tuition, something that is now in effect in 18 states.

Even at the time, it was an issue that split Republicans: “Rubio supported the in-state tuition proposal for immigrant students but said his leadership remained fearful that the legislation would be a boon for illegal immigrants,” The Miami Herald reported in 2003.

Both Rubio’s former immigration proposals and his association with Rivera have become political liabilities in the years since.

Rubio was burned, and continues to be plagued, by his association with the Senate “Gang of Eight”—their comprehensive immigration bill never became law, and the senator has been accused by his opponents of having supported “amnesty.” His support for undocumented immigrants receiving in-state tuition rates adds fuel to the flames, giving his opponents ammunition in a race that has been defined by Trump and populist outrage over immigration.

“It surprises no one that Rubio has been a consistent supporter of policies that encourage more and more illegal immigration. While Rubio doubles down on amnesty and wants to reward those who have broken the law, Ted Cruz has led the fight to stop it,” Catherine Frazier, a Cruz spokeswoman, told The Daily Beast. “[Cruz] is unapologetic about the importance of enforcing our laws and putting an end to policies that encourage people to break our laws.”

Rubio’s stances have shifted back and forth through the years.

In October 2011, Rubio said that “As a general rule, people in the United States who are here without documents should not benefit from programs like in-state tuition.”

But in 2014, he said that a law permitting in-state tuition for undocumented immigrants “should be something they could consider... I think the better approach is to solve the immigration problem at the federal level.”

Neither the Rubio campaign nor Rivera responded to a request for comment on whether they stood behind their in-state tuition proposals.

Nowadays, Rubio’s immigration strategy is more hardline: he calls for securing the border first, before any other immigration reforms are to be pursued.

Rubio’s record on in-state tuition for undocumented immigrants also brings back into view Rivera, who has been an ally to Rubio since the two both got started in Florida politics. In the past, for example, Jeb Bush’s campaign has made a point of trying to dissuade donors away from Rubio by labeling him a “risky bet,” in part due to his association with Rivera.

The two pols owned a home together in Tallahassee, which led to its own mini-scandal when it faced foreclosure just as Rubio was running for U.S. Senate. As they were both ascending in their careers, Rubio and Rivera were often inseparable—but now that Rubio is running for office, the ties have been publicly cut. Rivera was hit with a $58,000 fine last year for improper billing of government funds while a Florida House member.

But while Rubio is apparently done with Rivera, Rivera isn’t done with appearing publicly at events that Rubio is attending. On at least two occasions, the Cleveland and Milwaukee Republican presidential debates, the ethically challenged former congressman has been spotted in the audience.

As the first presidential contests near, and the microscope continues to hone in on Rubio’s record, the Florida senator will confront these dual liabilities—or else face an electorate that’s largely looking for a stricter messenger on immigration.