LOS ANGELES — It wasn’t perfect, and it didn’t need to be.

It wasn’t ruthless, yet there was pain inflicted.

It wasn’t USC at its best, but on Saturday in a 45-17 win over Fresno State, the Trojans took another step toward a memorable season in Lincoln Riley’s debut.

In fact, they took several steps, in rapid succession, all night long against a Bulldogs defense that was on its last legs less than 15 minutes into the game.

*****

In Week 1, USC used a balanced attack to blitz the Rice Owls. Last week against Stanford, Caleb Williams and the passing game shined against a Cardinal defensive backfield that was supposed to rank among the conference’s best.

But on Saturday against Fresno State, USC simply stomped over the overmatched Bulldogs, rushing for a season-high 233 yards on 38 carries, as two former Pac-12 foes — Oregon’s Travis Dye and Stanford’s Austin Jones — both topped 100 yards while Williams rushed for two scores.

Once again, USC was hot early, scoring touchdowns on its first three drives while building an early 21-3 lead.

“The run game was really pretty good most of the night,” USC coach Lincoln Riley said after the game. “We were steady. The line was really good in the run game. Those guys started seeing it pretty well and we had some big ones really close. You’ve got to run the ball to win and to win consistently. I’m proud of the way we ran it today.”

In some ways it was a message to the Pac-12 and the rest of college football.

Pick your poison. Either way, you’re going to get stung.

*****

Last week against the Cardinal, the Trojans scored on their first five drives but flamed out in the second half.

One major reason: the running game did not put the offense in advantageous positions early in the half. As a result, after scoring 35 points in the first half, the Trojans scored six in the second.

On Saturday, USC had seven runs of more than 10 yards in the second half against the Bulldogs, including four in the third quarter, and all told, USC gained 92 rushing yards on 11 carries in the third quarter, an average of 8.4 yards per rush.

Dye had 42 yards in the quarter, including a 25-yard touchdown run, and Jones had 30 of his game-high 112 yards in the third, including runs of 12 and 11 yards.

That is a big reason the Trojans scored on their first three possessions of the second half.

“I’m really proud of how we played in the second half,” Riley said. “That was a very big point of emphasis throughout the week, especially coming off the Stanford game, of putting together a more complete game.”

And speaking of a complete game, there’s Caleb Williams.

*****

One of the most beautiful plays in all of college football is the run-pass option, and Riley’s offense features several variations of that kind of freedom. Putting the ball in Williams’ hands like that is an emboldening type of play, the kind that lets a quarterback know, “I trust you.”

Williams had gains of 11, 10, and 8 yards, rushed for two touchdowns, and had four first downs on the ground.

His dynamic dual-threat ability kept Fresno State guessing, not just on the plays when he called his own number, but when he incorporated Dye and Jones into the option game as well.

“I tried not to use my legs, but it is an ability I have,” Williams said. “I want to be the best mailman, best delivery man back there. But I had opportunities that opened up and the defense was giving it to me.”

*****

So much of what has been written about USC in the early weeks — and especially in the lead up to the season — was about the Trojans prodigious passing game, featuring newcomers Williams, Jordan Addison, Mario Williams and more.

Getting the ground game rolling heading into Pac-12 play, though, puts USC at another level.

Now the Trojans have another task: get the defense playing up to the offense’s standard.

USC allowed 421 yards, including 164 rushing yards on 32 carries, an average of 5.1 yards per rush. The Trojans were better against the pass, knocking out Fresno State’s star quarterback Jake Haener with a high ankle sprain, but Haener’s backup, Logan Fife, went 11-for-12 for 140 yards.

The Trojans were good on Saturday. Through three games, have we seen greatness yet? Have we seen USC even scratch its surface?

“We just held a really, really good offense and offensive staff of talented guys to 17 points,” Riley said. “Can you get better? Absolutely. Do we expect it to get better? Yes. But we’re finding ways to allow people to not score very many points and win games and make big plays when we need to make them. Absolutely something we’ll continue to build on, but we’re growing, we’re learning. Each week, there are a few less mistakes and a few more things right.”