“It’s nice to finally get one,” Marchand said of his second-period goal, the eventual winner in the Bruins’ 4-1 victory over the Panthers Thursday night at TD Garden. “It’s been a while. I forget what it felt like.”

Twelve games had come and gone without a goal for Marchand, as he had struggled to find his offense, made too many mistakes, and dealt with a demotion to the third line. But that play in the third period, four minutes in, demonstrated the confidence that is slowly creeping back into his game.

The winger, in the midst of his longest scoring drought since his rookie season, made a risky play near the blue line, pivoting around the Panthers’ Dmitry Kulikov and sending the puck to Patrice Bergeron. Marchand immediately skated toward the net and was there in perfect position to clean up the puck when Dennis Seidenberg’s shot from the point deflected off Loui Eriksson and past Scott Clemmensen.

“When things aren’t going right, you just want to get to the dirty areas and hope for some bounces,” Marchand said.

He later added that the past month has been “frustrating. You want to contribute. You know you can. When you see the games go by and not only are you not scoring, but I wasn’t really playing well, it’s very frustrating. You want to pull your own weight.”

Asked whether it was good to see Marchand score, Chris Kelly deadpanned, “Nope.”

“I thought Marshy played really well tonight,” Kelly added. “He was moving his feet. He played well in all three zones. He was in on the forecheck. It’s nice to see a guy get rewarded like that with a goal. His [celebration] there, I think it showed.”

It wasn’t Marchand’s prettiest goal. But it was a goal nonetheless, his first since the second game of the season and his second in 15 games.

Nor was it the prettiest game for the Bruins, but as it was for Marchand, it was a needed step forward. Boston had come into the game on a 1-3-1 stretch, searching for answers.

After the first period, it appeared that it might be more of the same, with six giveaways, sloppy play in their own zone, and few good scoring chances.

But the Bruins got better as the game went along, scoring once in the second at 7:17 on a long shot from David Krejci (his first in five games) for a 1-0 lead. The Marchand goal followed at 4:09 of the second, and the Bruins kept coming, adding on a wrister from Torey Krug at 8:57 and finishing with an unassisted goal by Reilly Smith with 1:47 to go.

“I think right now we’re — I don’t want to say a fragile team — but we’re not at the confidence level that we want to be at,” Kelly said. “It kind of showed in the first period. I think the effort was there from everyone. It was just somewhat of the execution maybe wasn’t. But we stuck with it, stuck with the game plan.”

The Panthers scored at 14:25 of the third period, courtesy of Jesse Winchester, who hadn’t made any friends after an elbow to the face of Kelly that went unpenalized in the first period. There was also a near miss for the Panthers with 1:48 to go in the second on a wraparound try by Jonathan Huberdeau. But Tuukka Rask managed to plug the gap with a skate, and the Bruins kept their lead.

At the end of the night, it was a game that Bergeron called “a step forward” for a team that needed one.

“We got back to doing those little things that make us a good team,” Krug said. “For us, it’s just about using that to continue on to the next game. Doing those little things — taking care of the puck, getting our forecheck going. That’s what makes us a good team.”

Julien said that, despite the sloppy first period, he didn’t feel moved to offer harsh words in the break.

“You have to let these guys work their way out of it, and I think whether we yell or keep correcting them, I don’t think it’s going to help them get out of it,” Julien said. “Sometimes you have to work yourselves out of it, and I thought that kind of happened a little bit tonight.”

He was rewarded with more physical play as the game went on, with more confidence, with better puck movement. He was rewarded with a win. And while it clearly wasn’t the perfect, full-60 minute game the Bruins are striving for, it was better.

And, as Marchand said — about himself and the team — “you’ve got to start somewhere.”