When Gregg Bernstein attended MassArt in the early ’90s, he was tagging walls with spray-paint and running from the Boston Police. These days, the cops call Bernstein with ideas of where his next mural should go.

“Back then, graffiti was the thing. Everybody skateboarded and everybody had their own tag,” Bernstein said on a hot Allston morning, paintbrush in hand. “But you get into a little bit of trouble, and it’s not worth the hassle.” After dipping his brush into a paint-splattered can, Bernstein surveyed the wall he was working on. “Doing legitimate murals on city walls where people see your work is much better,” he said. Bernstein, 41, has been legally painting on Boston’s city streets for more than 20 years. He’s produced nearly 50 murals for the city on public walls where graffiti proliferates.

The Mural Man from Jasper Craven on Vimeo.

“The city can come and power-wash graffiti, but in a week, someone’s going to come back and do it again,” Bernstein said. “But if we put a mural up, it’s going to get some respect.”

Bernstein just recently finished a piece on the cracked wall on the side of Fast Eddie’s Barbershop on Glenville Avenue. The mural, which Bernstein started in October, depicts vintage images of Harvard Avenue painted in black and white. As the eye moves along the black and white city scene, color comes into the picture, and the streetscape transitions into a modern representation of the historic Allston byway.

Richard Lamoretti, the owner of Fast Eddie’s, said the back wall of his shop had been in disrepair before Bernstein began brushing it.

“There has been a graffiti problem there for a while,” he said. “I like the new mural, it shows Allston in the ’30s, when my grandfather started this barbershop.”

Bernstein began painting for the city in 1994 as a part of the Mayor’s Mural Crew, a youth employment program started under then-Boston Mayor Raymond Flynn. Bernstein and other local artists first focused their efforts on Codman Square in Dorchester, one of the most defaced spaces in the city.

“At one time we had six crews and 70 kids employed, murals would be going up everywhere,” Bernstein said. “But the funding got cut through the years.”

In 2011, after 17 years working for the city, Bernstein was let go. Determined to keep painting, he turned to neighborhood associations and art foundations to support more projects. His past two murals have been commissioned by Allston Village Main Streets, a community organization.

“We love bringing public art to the community because it can help unify Allston and celebrate its history,” said Alana Olsen, the director of Allston Village Main Streets. “Gregg is a fantastic muralist, he understands the public art process and he is very good at working with a wide variety of stakeholders and groups.”

Though city officials say graffiti isn’t as rampant as it once was, it remains a problem. The Graffiti Busters, a program started under former Mayor Thomas Menino, has visited more than 1,000 locations to remove paint, according to the group’s website.

“The Graffiti Busters personnel work five days a week,” wrote Gabrielle Farrell, a spokeswoman for Mayor Marty Walsh, in e-mail. “The Allston and Brighton neighborhoods receive the most graffiti removal services.”

The city’s relatively new Citizen Connect phone application has also improved detection of illicit graffiti. By allowing residents to file graffiti reports with the touch of a button, the city has been alerted to more tags. Within one hour on a recent weekday, 11 out of the 20 reports on Citizens Connect were related to graffiti.

In Allston, where Bernstein does much of his work, Boston Police Sergeant Michael O’Hara said the Allston-Brighton district has seen a 50 percent decrease in graffiti in recent years. But the problems remain.

“We get anywhere between 250 to 500 complaints of graffiti per year,” O’Hara said. “We still need more murals.”

Bernstein’s Allston murals cover the most public and problematic walls, as per requested by the community.

“Behind the buildings and in the alleys we leave things alone, we let the graffiti stay there,” Bernstein said. “But on the main streets no one wants to see it.”

Bernstein’s first piece commissioned by Allston Village Main Streets resembles a postcard welcoming viewers to Allston. Inside the big block letters are images of notable landmarks throughout the neighborhood.

“It was a problem wall, there had been illegal advertisements and the neighboring church had a lot of complaints” Olsen said about the surface Bernstein painted, which is located on Farrington Avenue.

Before the mural was allowed, Bernstein met with Olsen and her staff, local business owners, and a design committee. After the landlord signed off, Bernstein went to work. The wall has been tag-free ever since.

“I do believe that installing public art that people enjoy and appreciate does largely prevent the graffiti from recurring in that space,” Olsen said. “Though there seems to be more murals tagged these days, which for someone to ruin something for their own vanity is the highest form of insult.”

But, she added: “As a rule, that doesn’t happen.”

Bernstein said the Fast Eddie’s mural is one of his favorites. His murals take at least 100 hours of painting if he’s working alone, he said.

He then named off the various locations of his murals in Allston, which total around 10. After explaining that his mural work leaves little time for formal gallery shows, he flashed a smile and looked lovingly at his work-in-progress.

“I like to say that Allston is my art gallery,” he said. “You can see all my work driving down Harvard Avenue.”