In the dry heat over Afghanistan, Phil Kominski and his band’s military plane took enemy fire, forcing the pilot to dodge a spray of bullets, while en route to perform for service members in the fall of 2007.

Nearly five years later, with the heat index pushing 100 degrees, the Lloyd Dobler Effect was already an hour into its set last Thursday at the Washingtonian Center in Rockville. Kominski, lead vocalist and guitarist, was drenched in sweat as the band finished playing a trending favorite cover to a cheering audience.

Blending rock, pop and Latin flair, the Silver Spring band has performed more than 1,800 times in 39 states and 15 countries — from Abu Dhabi in the United Arab Emirates to Wilmington, N.C. The band boasts a collection of more than 300 songs and seven albums.

In 2004, 2006 and 2007, the band headlined the Armed Forces Entertainment Tour, traveling to Afghanistan and other Middle Eastern, Asian and Pacific countries.

“When we were in Afghanistan, we were on our way to a base in a C-130, and I started noticing that the plane was moving back and forth,” Kominski said. He turned to the soldier sitting next to him and asked what was going on. The soldier replied they were being shot at.

“I kind of laughed, but then I realized he was serious,” Kominski said. Luckily, it was only small-arms fire with very little chance of doing damage.

At night, on the base, Kominski said he could hear explosions and gunshots. The base was kept dark so as to not attract the enemy’s attention. Personnel members walked around with dimly lit glow sticks.

“We are just trying to do something for the greater good and help people have a brighter day,” Kominski said.

The band formed in 1996 when Kominski and drummer Donnie Williams, both now in their early 30s, attended John F. Kennedy High School in Silver Spring together.

“He and I hit it off really well — it just kind of clicked,” Kominski said. “We enjoyed writing together and had good chemistry.”

Kennedy’s diversity had an effect on their sound, pushing them to add elements of go-go and Latin music to their songs. The band, named for actor John Cusack’s good-humored, romantic character in the 1989 movie “Say Anything,” played sporadic shows while the two went to college.

“As the years have gone on, naturally we have incorporated [Lloyd Dobler] into our shows. We have that lighthearted approach with a good end goal,” Kominski said.

Kominski started playing music in middle school.

“I remember when I got my first guitar. I was 12 and my friend had one of those parents that kept a lot of alcohol around. My friend said, ‘If you get me a beer from the fridge, I’ll sell you one of my guitars.’ So I did, and he sold it to me for like 20 bucks,” Kominski said.

Within two years, he joined a local band.

“We were awful,” Kominski said. The band played one gig at a basement party, and after their first song the band began fighting. The show ended.

“I went up and acted like Axl Rose,” Kominski said.

It wasn’t until after Kominski graduated from the University of Maryland at College Park in 2001 that LDE saw fame. In 2002, the band won the HFStival’s Big Break contest competing against hundreds of bands.

After winning, the band began touring full time.

In 2005 the band did 235 shows and drove more than 100,000 miles in the United States. These days, they keep things more low-key by playing fewer shows as a full band.

“When you are young, you want to tour all the time and make it big, but when you are older, you want to balance your time with your family,” Kominski said.

Kominski has a 3-year-old boy and 7-month-old daughter. Williams also has two children. His son, Cole, 7, is already a percussionist and will make cameos with the band.

“They’re terrific guys and wonderful family men. They are very dedicated to their profession,” said Karen Della Torre, a friend of the musicians.

When the band is not touring, Kominski plays solo shows or with his wife in an acoustic band called Elizabeth, Phil and Chris.

“Keeping a band together takes a lot of communication,” Kominski said. “We e-mail or call each other multiple times a day.”