Marco Rubio ran for Senate as an immigration hard-liner, but the lawmaker from Florida struck a very different tone in the early years of his political career, championing the plight of farmworkers and undocumented college students, according to a forthcoming biography.

As a state legislator, the Republican teamed up with a prominent Democrat to introduce a bill to protect field workers, many of them illegal immigrants. He promoted legislation to extend in-state college tuition to illegal immigrants. But his rhetoric shifted when he ran for the U.S. Senate a few years later with the backing of the tea party movement.

The shift underscores the tension inherent along Rubio’s unusual path to political prominence, detailed by Washington Post staff writer Manuel Roig-Franzia in the book “The Rise of Marco Rubio,” set for release June 19. Rubio’s autobiography, “An American Son,” also will hit bookstores that day.

Roig-Franzia’s unauthorized biography paints a picture of a politician torn between the overtures expected of a Hispanic politician and the demands of a conservative base that made him its darling.

But the book also traces the trajectory of a savvy political figure who did not hesitate to leverage, and in some cases misstate, his family’s Cuban American roots. Rubio was so focused on his political future that he hired a public relations firm to uncover any skeletons that could threaten his plans.

Rubio’s name remains on the shortlist of potential Republican vice presidential nominees. At the same time, he is attempting again to add more nuance to his public stance on illegal immigration.

Rubio has been trying to build support for a Republican version of the Dream Act, which would have created a path to citizenship for college students and military members who had been brought to the country illegally as children. Rubio opposed the original bill and has sketched out an alternative that would allow visas but not citizenship.

His opposition to the original measure stems in part from the ability of the beneficiaries to sponsor their relatives for citizenship. But the book shows that Rubio’s own family, including his parents and grandparents, benefited from “chain migration” policies.

Documents obtained by Roig-Franzia show that Irma and Luis Lastres, Rubio’s aunt and uncle, completed “affidavits of support” to help multiple relatives gain legal entrance to the United States. Rubio’s parents also applied for an immigrant visa and alien registration, noting that they were “destined to” his aunt Dolores Denis.

On Wednesday, a Rubio spokesman said that the senator generally supports family reunification and legal chain migration but that the original Dream Act was too broad.

As the book details, Rubio’s family history clashed with his harsh rhetoric on illegal immigration in another way: His grandfather Pedro Victor Garcia entered the country illegally in 1962 and remained in violation of a deportation order. Garcia, who left Cuba because of the Fidel Castro regime and personal reasons, later may have gained retroactive refu­gee status.

The book delves into a revelation last year that the story Rubio had long told of his parents fleeing Castro’s regime was untrue. Documents obtained by Roig-Franzia showed that Rubio’s parents came to the United States in 1956, 2 1 / 2 years before Castro’s rise.

Rubio has said that he was relying on “family lore” and that the gist of the story remains true. Rubio spokesman Alex Conant, who said the senator did not previously know that his grandfather had been in the country illegally, said Garcia’s story proves that Rubio “grew up in the exile community, and clearly this story adds new details to that compelling story.”