On a streaking drive to the basket with less than five seconds remaining, guard Ashley Owusu ensured there would be no chance of a second straight letdown for Maryland women’s basketball.

The freshman’s running layup broke a 68-68 deadlock with James Madison, providing the spark the Terps lacked three days prior in a loss to South Carolina.

Owusu capped an improbable fourth-quarter comeback Wednesday night, putting the finishing touches on a 70-68 win after her team rallied to outscore the Dukes, 29-11, in the final frame.

“[I was] just extremely proud of our poise,” coach Brenda Frese said. “For us, it was just uncharacteristic of [being] out of rhythm, first time on the road and as we’re kind of still trying to find our chemistry. … We could have put our heads down, but we brought a lot more energy on the defensive end.”

[Read more: Maryland basketball’s Ashley Owusu was a bright spot in South Carolina loss]

After 3-pointers by James Madison at the end of the third quarter and on the first possession of fourth, Maryland saw itself down 19 in a game riddled with sloppy turnovers and wasted offensive possessions.

But forward Shakira Austin, coming off one of the worst games of her career, helped lead the comeback with 13 points on 6-for-6 shooting in the final period, turning what was a forgettable first three quarters into one of the signature performances of her college career.

“I thought Shakira was huge for us in that fourth quarter when you talk about the presence that she made,” Frese said. “We said it on the bench that we felt like we had to go through her. … I thought she was phenomenal when her number was called. Obviously, she changes the game for us when she’s playing as hard as she did tonight for us.”

Austin finished with a career-high 20 points on 69.2 percent shooting in the team’s first away game of the season, but there were a slew of mistakes she and the team made leading up to their resurgent run.

Maryland’s lackluster performance against South Carolina carried over to the start of its matchup against James Madison, trailing 9-1 midway through the first quarter. After missing six straight shots, a 3-pointer from Owusu was the Terps’ first made field goal after more than four minutes of play.

The second quarter proved similarly problematic for Maryland, failing to score until the 5:40 mark of the frame. On what should have been an easy score during a 2-on-1 fastbreak, forward Blair Watson tried to find forward Kaila Charles with a behind-the-back pass that instead hit her right in the knee.

“We weren’t really buying into our system in the beginning. We were doing a lot of 1-on-1 plays and we were lacking communication and energy on defense,” Charles said. “We just got to trust the system and the process so we just finally put it together in the fourth quarter.”

[Read more: Despite a rough game, Maryland basketball knows Shakira Austin is “going to be a star”]

The feed led to one of Maryland’s seven turnovers in the quarter, but Watson made up for the blunder in a big way a couple of minutes later when she recovered an offensive rebound, dribbled out beyond the arc and rattled-in a fading 3-pointer to cut the deficit to seven.

That proved to be the effort play Maryland needed as it started to lock-down defensively and box out on rebounds. Defensive improvement helped the offense find its groove, turning the Terps into the team the Dukes were expecting to face.

Watson then hit a second long-range shot with 50 seconds left before halftime, capping a 12-3 run in the final five minutes of the quarter to get her squad within striking distance after a half plagued by slow starts to both quarters and just a 34.5 percent shooting.

That improvement evaporated at the start of the third quarter, though, with a bad post-entry pass from Charles leading to another period with six turnovers. When two wide-open 3-pointers ballooned the Dukes’ lead to 19, it looked like Maryland’s night was over.

Charles, Maryland’s preseason All-American, struggled mightily throughout. She looked out of sync en route to a season-low eight points on 3-of-13 shooting with a team-high five turnovers, but she did provide energy with a team-high 10 rebounds.

A 10-0 run from Maryland narrowed the fourth-quarter deficit before a 14-0 surge — capped with a jumper from Austin — gave Frese’s squad its first lead of the night. And while Dukes guard Lexie Barrier leveled the contest once more at the charity stripe, Owusu’s layup secured the Terps’ ferocious comeback to prevent a second straight loss.

“We just came out a lot more aggressive [in the fourth quarter],” Austin said. “It started off with steals and being able to turn defense into offense and slowly just knowing that you have to attack with less dribbles, going to their body.”