SACRAMENTO — California has prospered over the past eight years despite critics’ warnings of doom and financial collapse, Gov. Jerry Brown said Thursday, arguing in his final State of the State speech that the embattled high-speed rail and delta tunnels will ultimately emerge as successful projects that greatly benefit the public.

In a wide-ranging speech, the termed-out 79-year-old governor passionately argued for the unpopular undertakings, saying any big project has setbacks.

“Difficulties challenge us, but they can’t discourage or stop us,” Brown said in his 16th State of the State speech. “Yes, there are critics, there are lawsuits — lots of them — and there are countless obstacles. But California was built on dreams and perseverance and the bolder path is still our way forward.”

Brown told lawmakers at the Capitol that governments have to do what individuals can’t, such as building big infrastructure projects. He reminded lawmakers that often, in these big projects, like the building of the new eastern span of the Bay Bridge — costs escalate — but that this should not deter the state from being bold and moving ahead. Those projects, he said, ultimately serve a public need.

Among those projects, he said, is the state’s responsibility to fix and maintain its vast network of freeways and bridges. The state’s transportation system is essential, he said, vowing to fight a Republican-led effort to repeal the gas tax. Last year, Brown signed a bill to increase gas taxes and vehicle registration fees to pay for road maintenance. Opponents of the law are currently collecting signatures for a ballot measure to overturn it.

Now Playing:

“Fighting a gas tax may appear to be good politics, but it isn’t,” Brown said. “I will do everything in my power to defeat any repeal effort that gets on the ballot, you can count on it.”

He argued it’s better to build a bullet train than to build more freeways and expand airports.

“I make no bones about it,” Brown said. “I like trains and I like high-speed trains even better.”

During his last two terms, Brown said, the state has grown stronger — with more jobs and wealth — even after daunting deficits, divisive political fights and doubts over its governability.

He emphasized the need for the state to lead by example on climate change and environmental protection: “We can’t fight nature. We have to learn to get along with her,” he declared, twice.

Clean energy and greenhouse gas-reducing initiatives, such as the state’s goal of putting 5 million zero-emission vehicles on the road by 2030, are essential to protecting the environment, he said.

He noted that eight of the state’s most destructive fires have happened in the past five years, with the Thomas Fire in Ventura and Santa Barbara counties becoming the largest in recorded history. Devastating mudslides that followed were among the most deadly in state history.

He announced he is convening a task force to review how the state manages its forests to reduce the increasing threat of fires — and protect the trees that help reduce carbon, a cause of climate change.

“We should never forget our dependency on the natural environment and the fundamental challenges it presents to the way we live,” Brown said.

Brown, who served two terms as governor from 1975-83 and began another two terms in 2010, will cap his 50-year political career in December.

Like with his previous 15 State of the State speeches, Brown highlighted education and criminal justice reform. He touted his Local Control Funding Formula, which gives more money to school districts with low-income, foster and English learner students.

Brown mentioned the “struggle for funds” when it comes to higher education — a nod to the University of California regents, who postponed a vote on tuition increases Wednesday.

The governor is proposing an online community college so working adults can receive low-cost training to raise their wages.

Brown also urged lawmakers to look at the state’s criminal justice system — with its growing prison budget and massive penal code provisions. New laws have been added — oftentimes in response to a specific heinous crime — without considering how each law interacts with the ones on the books, Brown said.

“My plea is relatively straightforward: Take time to understand how our system of crime and punishment has evolved, how other states and countries have devised their prison systems and what changes we now make,” Brown said.

While his State of the State speeches typically are short, with last year’s address lasting 16 minutes, Brown held the rostrum for 30 minutes on Thursday. He lingered in the Assembly to pose for selfies with lawmakers and signed their commemorative programs where he typically was whisked away after previous speeches.

“I thought he gave a great 16th and final speech,” said Assemblyman Phil Ting, D-San Francisco. “He doubled down on the environment, focusing on clean air, clean water and enshrining those victories.”

Brown said as the climate changes and more rain instead of snow changes how the state captures and stores water, California will need to modernize its “broken water system.” To that end, he said he remains convinced the delta tunnels project is the answer.

“That is the reason I have persisted,” Brown said.

The delta tunnels project and high-speed rail have been beset by problems. The high-speed rail is billions over budget, behind schedule and suffering from a revolving door of leadership. Brown is considering scaling back the controversial delta tunnels plan that would move water around the state, from two tunnels under the Sacramento-San Joaquin River Delta to one.

While Brown was making the case for the projects to lawmakers and the public, his most crucial audience may be the next governor. Two hopefuls — Lt. Gov. Gavin Newsom and state Treasurer John Chiang — sat beside him while he spoke.

Newsom said Brown is “wise” to scale down the tunnels project as he tries to move the project forward.

“There are few things more attached to his legacy than this issue,” Newsom said. “I’m hopeful the governor can pull it off.”

Newsom, who has been critical of the bullet train’s financing and lack of transparency, said Brown rightfully made the case for the project.

“This is a very challenging projet to complete and (if elected) I am up for that task,” Newsom said. “I want to see it done.”

Melody Gutierrez is a San Francisco Chronicle staff writer. Email: mgutierrez@sfchronicle.com. Twitter: @MelodyGutierrez