California's state senate has approved a law allowing undocumented immigrants to gain access to the state's healthcare exchange and Medicaid benefits.

The bill was introduced last year and passed with some Republican support.

California Senate Bill 4 amends Section 100522 of the state's government code as well as two sections of the Welfare and Institutions Code allowing undocumented immigrants access to the California Health Benefit Exchange, created after the passage of the Affordable Care Act (ACA), and Medi-Cal, California's Medicaid.

The bill passed with a majority of 28 votes on Tuesday June 2. Eleven senators voted against it. Two Republicans, State Senators Andy Vidak and Anthony Cannella, voted with the Democratic majority approving the bill.

Introduced in December 2014 by Sen. Ricardo Lara, the heavily amended bill would require California "to apply to the United States Department of Health and Human Services for a waiver" so those unqualified because of their immigration status can gain access to the state's healthcare exchange.

The bill would allow those eligible under the age of 19 access to full-scope Medi-Cal benefits while those who are 19 or over and are fit the requirements will either receive full or limited coverage, depending on funds.

If the Department of Health and Human Services allows California to grant undocumented immigrants access to the California Health Benefit Exchange, they would be able to purchase health insurance with their own funds.

Sen. Lara, the bill's author, welcomed the state senate's decision.

"Today's vote is a transformational and decisive step forward on the path to achieving health for all," he said in a statement. "Over the past year I've worked to draft a bill that is realistic, balanced and fiscally prudent, while arriving at our goal of expanding access to health care for some of our most vulnerable communities. That's what we've achieved with SB4 - allow undocumented Californians to purchase health insurance through a waiver, cover all children and establish a capped enrollment program for adults."

Sen. Vidak, one of the two Republicans who voted in favor, argued "the taxpayers are already paying high healthcare costs for the undocumented when they show up in our emergency rooms," according to the Los Angeles Times.

The California Immigrant Policy Center was one of the various organizations that welcomed the bill.

"The Senate has taken a key step toward upholding a basic human right and has set a solid foundation, which we are well-positioned to build upon in the future," said the group's executive director, Reshma Shamasunder.

"Now, all eyes are on the Assembly," she continued. "We urge the Speaker to embrace and champion the Senate's $40 million investment in expanding access to life-saving care. Californians from communities across the state are counting on their leadership. With this proposal, California would provide basic health coverage to more undocumented people than any other state in the nation."

The bill's potential cost could be something that forces the State Assembly to scrutinize the bill further. Back in early May, a fiscal analysis of the bill found it would cost between $175 million to $740 million, according to the San Jose Mercury News.

A report from Health Access California, a health care lobby group, stated the Legislative Analyst's Office (LAO) stated The bill has received will receive an initial funding of $40 million, which start to cover projected costs between $20 and $150 million. These numbers, however, only apply to the estimated 195,000 to 240,000 children who would be eligible for Medi-Cal.

"This bill would only add hundreds of thousands of patients to the rolls with no one to care for them," Republican State Sen. Jeff Stone said, the Los Angeles Times reported.

The bill now heads to the California State Assembly for approval.