The University of California system on Tuesday set a goal of powering all its campuses and medical centers with 100 percent renewable energy by 2025, as part of its efforts to fight global warming.

The system has already committed to making its daily operations carbon-neutral by the same year, meaning they won’t add greenhouse gas emissions to the atmosphere. Two years ago, it opened a solar power plant in Fresno County to help boost the school system’s supply of renewable electricity.

The university system also will try to make its existing buildings more energy efficient. And after June 2019, no new UC buildings will use fossil fuels on-site for space or water heating.

“UC’s system-wide commitment to carbon neutrality and sustainability originated from students asking the university to practice what it teaches,” David Phillips, the system’s associate vice president for energy and sustainability, said in a statement. “Our students have been great partners, and their leadership has encouraged us to take a major step by committing to buy 100 percent clean electricity by 2025.”

David R. Baker is a San Francisco Chronicle staff writer. Email: dbaker@sfchronicle.com Twitter: @DavidBakerSF