EVANSTON, Ill. (AP) Maryland figured out pretty quickly that Melo Trimble had an extra gear Wednesday night, so it kept going back to the junior guard.

There was never any reason to go anywhere else.

Trimble scored a career-high 32 points on 12-for-17 shooting, and the 23rd-ranked Terrapins strengthened their position in the Big Ten with a 74-64 victory over Northwestern.

''Tonight was my night,'' Trimble said. ''Just kept playing, and took what the defense gave me.''

Trimble repeatedly came up with big plays for the Terrapins (22-4, 10-3), driving inside for layups or connecting from long range. He made four of Maryland's eight 3-pointers and also contributed four rebounds and three assists.

It was a welcome turnaround for the Terrapins' leading scorer after he shot just 31 percent (16 for 52) in his previous four games.

''He's got to have the confidence. I can't give it to him. His mom can't give it to him,'' coach Mark Turgeon said. ''He's got to have it. He's got to be borderline cocky out there and I think he played that way a little bit tonight.''

Anthony Cowan added 13 points and Damonte Dodd had 12 as Maryland moved into a tie with Purdue for second in the conference, just a half-game behind Wisconsin. The Terrapins visit the Badgers on Sunday.

''Just to come out here and win this game is really special to this team and gives us a lot of confidence going to Wisconsin,'' Trimble said.

Northwestern (19-7, 8-5) was coming off a big 66-59 win at Wisconsin last Sunday, boosting its chances for the first NCAA Tournament appearance in the history of the program. But it got off to a slow start offensively and never recovered against Trimble and the poised Terrapins.

''We're not capable right now of throwing up 75, 80 points,'' coach Chris Collins said. ''We just don't have enough firepower. So we have to win games 65-60. Maryland is very potent offensively. They score the ball. We just couldn't match that.''

The Wildcats whittled a 20-point deficit to nine on Sanjay Lumpkin's layup with 3:16 left. But Dodd responded with a rebound basket, and the Terrapins closed it out at the free throw line.

Freshman Isiah Brown led Northwestern with a career-high 19 points. Vic Law had 12 points, eight rebounds and three blocked shots, and Dererk Pardon finished with 11 points.

''You can't be sluggish from the last win,'' Law said. ''You can't be thinking about `Oh we beat Wisconsin' because when you come in and play a team like this that's just as good as Wisconsin they can put you in a hole like they put us in.''

The Wildcats played without Scottie Lindsey, who was sidelined by mononucleosis for the fourth straight game. The 6-foot-5 junior, who leads the Wildcats with 15.4 points per game, is day to day.

With Lindsey out and Bryant McIntosh battling foul trouble, Northwestern struggled to score against Maryland's suffocating defense. The Wildcats heated up a bit in the second half but shot 39 percent (23 for 59) for the game. McIntosh finished with nine points on 3-for-13 shooting.

BIG PICTURE

Maryland: Trimble and the Terrapins appear to be back on track after consecutive losses to Purdue and Penn State at the beginning of February. Maryland stopped the slide with an 86-77 victory over Ohio State on Saturday, and then stepped up with a composed effort against a Northwestern team looking for another signature win for its resume.

Northwestern: The Wildcats miss Lindsey, but they also hurt themselves against the Terrapins. They went 13 for 23 at the line.

BRIGHT SPOT

Brown gave Northwestern a big lift in his best performance of the season. He was 6 for 15 from the field and 5 for 6 at the line. He scored just nine points in his previous two games.

''My focus is just anytime I'm out there I try to make a shot or a positive contribution,'' he said.

UP NEXT

Maryland visits No. 11 Wisconsin on Sunday afternoon.

Northwestern hosts last-place Rutgers on Saturday.

---

Jay Cohen can be reached at http://www.twitter.com/jcohenap

---

More AP college basketball: www.collegebasketball.ap.org and https://twitter.com/AP-Top25.

Copyright 2017 by STATS LLC. Any commercial use or distribution without the express written consent of STATS LLC is strictly prohibited.