WASHINGTON — Caleb Foster returned from a broken foot and rescued Duke’s national title hopes, helping the top-seeded Blue Devils rally from a 10-point second-half deficit to beat St. John’s, 80-75, on Friday night and advance to the Elite Eight.

Playing less than three weeks after surgery on his left foot, Foster scored all of his 11 points in the second half. Isaiah Evans scored 25 points, and Cameron Boozer had 22 points and 10 rebounds for the Blue Devils (35-2), who extended the nation’s longest active winning streak to 14, but not before the tenacious Red Storm (30-7) pushed Duke to the wire.

Duke will face either second-seeded UConn or third-seeded Michigan State in Sunday’s East Region final.

The Blue Devils led 77-74 with 32.4 seconds left when Boozer missed the front end of a one-and-one. Zuby Ejiofor drew a foul at the other end with 14.7 seconds to play, but the St. John’s standout made only one of two free throws.

Evans also made one of two, giving the Red Storm one last chance to tie it, down 78-75. But Dylan Darling — whose layup at the buzzer against Kansas in the previous round put St. John’s in the Sweet 16 — missed badly from well beyond the arc. Boozer made two free throws with 1.5 seconds left.

It was just the second loss for St. John’s coach Rick Pitino in 14 visits to the Sweet 16 — and just the second loss for this season’s Red Storm in their final 23 games.

After a relatively sure-handed first half, the Blue Devils were sloppy to start the second. A turnover by Boozer led to a dunk by Ejiofor. Then Boozer’s brother Cayden had the ball stolen near midcourt by Darling, and Ejiofor dunked again to put St. John’s up 48-44.

A Duke timeout did little to help. Another turnover by Cayden Boozer led to a layup by Ejiofor. Then the 6-foot-11 Ruben Prey sank his fourth 3-pointer in four attempts, and suddenly the Red Storm were up 53-44.

Duke countered by inserting Foster for Cayden Boozer. He helped steady the offense a bit, and the Blue Devils went to a zone on defense. They fell behind by 10 before beginning their comeback.

A 3-pointer by Evans put Duke ahead at 63-62. Bryce Hopkins answered with a 3 for St. John’s. Then an acrobatic layup by Evans tied it — and the chase was on.

Dillon Mitchell dunked home a missed free throw to put St. John’s up 69-67. Then Evans made another 3, causing Pitino to turn his back in apparent disbelief. Cameron Boozer banked in a shot from a tough angle while being fouled with 3:06 to play. The free throw put the Blue Devils up by four.

Foster’s pull-up jumper but Duke ahead 75-69. Ejiofor responded with a 3 for St. John’s, but Foster’s driving layup made it 77-72 with 1:27 left, putting the Red Storm into desperation mode.

As expected, St. John’s applied pressure from the start, contesting just about every inch of the court. Duke had some of the same problems Kansas did in the previous round, with inbounding the ball an adventure early.

Eventually, the Blue Devils settled in and led 35-28 following an 18-5 run, but four St. John’s 3-pointers later, the Red Storm were up 40-39 at halftime.

After shooting 11 of 35 from long distance against Kansas, St. John’s was 9 of 18 in the first half Friday. That included a 3 by Mitchell, who was 0 for 14 from beyond the arc on the season, and a 3-for-3 showing by Prey, who came in averaging 4.1 points.