Silicon Valley startup Theranos Inc. is fighting for its life after regulators decided to revoke its license to operate a lab in California because of unsafe practices and to ban founder Elizabeth Holmes from the blood-testing business for at least two years.

The sanctions were laid out in a letter to Theranos released Friday by the agency that oversees U.S. labs, the Centers for Medicare and Medicaid Services. Theranos said it is still seeking to resolve its issues with the regulator.

One sanction, a monetary fine of $10,000 a day until all deficiencies have been corrected, goes into effect July 12. The most serious sanctions, such as the ban of Ms. Holmes, won’t go into effect for 60 days.

If it fails to reach a settlement with the government, Theranos’s options are limited. Almost any course it takes will dramatically reshape the company that Ms. Holmes founded in 2003 as a Stanford University dropout and grew to a valuation of more than $9 billion in a 2014 fundraising round.

The company could appeal the sanctions to an administrative judge, which would put some on hold. Its odds of winning would be slim, according to legal experts and government data. Or it could withdraw from the lab-testing business altogether, focusing on developing devices. That would significantly change its mission.