Tanned, his hair cropped closely on the sides, and dressed in fatigues, Senator Scott Brown looked every bit the dashing soldier coming home from war when he returned from National Guard duty in Afghanistan a year ago.

His wife, Gail Huff, raced to meet him in a crowded terminal at Logan International Airport. Photographers captured their kiss and long embrace.

The scene has played out across Massachusetts countless times during the past decade as Guard units have returned from deployments in Iraq and Afghanistan.

Brown, though, returned not as a veteran of a protracted period of duty but after a 14-day Army National Guard assign­ment he requested. During that span, he spent seven days in Afghanistan itself.

While there, he participated in training exercises with the troops, but he also spent considerable time meeting with generals, ambassadors, and other leaders, an experience more akin to his role as US senator.

A picture of his reunion with Huff subsequently appeared in Brown’s reelection announcement video and reappeared in a television ad and web video.

And during his latest debate with Democratic challenger Elizabeth Warren Wednesday night, Brown noted that he “served in Afghanistan” as he protested potential cuts in military spending.

‘There’s a feeling of somehow not doing our part because we have not been called to extended active duty. For years, I’ve wished that I, too, could go over and serve, but, like all soldiers, I go where I am ordered.’ - Scott Brown, “Against All Odds’’

During his 32 years of Guard service, which started long ­before he entered the halls of government, Brown has established a strong record bolstered by consistently high officer evaluations.

But since being elected to the Senate in 2010, his service has taken on a political patina, with the Guard providing him unusual opportunities that he has used as fodder for his campaign, as well as the flexibility necessary to participate in one of the country’s most hotly contested elections.

As citizen-soldiers, all Guardsmen are required to serve one weekend a month and two weeks each summer.

In 2011, Brown was granted a request to fulfill his summer training commitment in ­Afghanistan, sending him to a combat zone for the first time in his military career just as his reelection campaign was ramping up.

This year, with the election in full gear, Brown was in a ­position to serve his summer duty in a piecemeal fashion, in single days spread beyond just the summer months, allowing him to avoid an extended ­absence from the campaign trail.

The two days he was known to have served in August coincided with the start of the ­Republican National Convention, the type of overtly partisan event he has avoided as he runs against Warren in what ­remains heavily Democratic Massachusetts.

In the past two years, the senator has also won a much-coveted promotion to colonel, one notch below general.

He secured it after a surprising transfer to the Maryland National Guard. Veteran ­observers of the Maryland Guard say it is the first time the state’s main judge advocate general corps, the military’s equivalent of a law firm, has had four colonels attached to it. Military manning documents authorize it for one.

At the same time, Brown ­began working out of the ­Pentagon, as assistant to the chief legal counsel for the ­National Guard Bureau, serving in the same office complex as the top general overseeing the Guard. These are the same people and the same agency Brown helps oversee as the ranking member, or top Republican, on the Senate Armed Services subcommittee with jurisdiction over the National Guard.

Brown’s dual roles and transfer have created a rare phenomenon: a US senator from Massachusetts sworn as a military officer to uphold the constitution of Maryland and, should the need arise, to take orders from Governor Martin O’Malley of Maryland.

Brown’s uniform bears a Guard emblem for Maryland, a state where he does not live, work, or fulfill his duty.

A central theme

Since his upset victory in a January 2010 special election to fill the seat that had been held by the late Senator Edward M. Kennedy, Brown has made it clear how central his Guard service has been both to his legislative agenda and reelection ­efforts.

The day the senator ­returned from Afghanistan, he called on Congress to support his legislation making it easier for US officials to break contracts with businesses caught funneling taxpayer resources to US enemies.

He also has organized job fairs for veterans returning from Iraq and Afghanistan, and filed what was known as the Stolen Valor Act to penalize those who might lie about their military records.

During his reelection campaign, Brown has released ­radio ads talking about his duty in Afghanistan and the ways it has made him a more informed senator. He has run another ad showing him in uniform, along with a picture of his airport ­reunion with Huff.

Brown declined to be interviewed for this article, instead saying he would let his officer evaluations speak for themselves.

Those documents were released by the military in January after a May 2011 public ­records request by the Globe. He also wrote extensively about his Guard duty in his 2011 memoir, “Against All Odds.”

Brown initially enlisted in 1979, after being inspired by the example of local soldiers rescuing stranded motorists in the Blizzard of ’78.

“I wanted to serve,” he wrote in his memoir. “Here were men whom I could admire, men whose job it was to protect others as the normal course of their lives.”

Brown rose from the infantry to an Airborne-qualified soldier and his current assignment as a judge advocate general officer, the military version of an attorney.

Early on, he helped soldiers heading off to war prepare their wills and powers of attorney. He then became the military’s top defense lawyer in New England, handling cases involving soldiers who got in trouble with civilian authorities or were going to be kicked out of the military for having drugs, for example.

“I got the reputation as the lawyer to seek out if there was a problem, because I always tried to go the extra mile for my clients, the soldiers,” Brown wrote.

Today, Brown spends his time in the Pentagon, up to 39 days a year, focused on legislative matters and working on policy coordination between Guard units in each of the 50 states.

Lawmaker role noted

As his political career progressed from the Wrentham Board of Assessors to the Massachusetts Legislature and on to the US Senate, his military evaluations and promotional and award recommendations also began to note his dual role as a lawmaker.

“LTC Brown demonstrated consummate professionalism and selfless dedication to duty by putting aside his weighty senatorial obligations to serve the needs of the Army,” wrote a captain who recommended him for a medal for a speech Brown delivered in 2010.

While Brown twice had Guard assignments overseas — to Paraguay for a week in 2005 for a judicial awareness program, and to Kazakhstan for about two weeks in 2007 for an emergency preparedness exercise — he has never been ­deployed for combat duty.

Brown was once assigned to an infantry brigade but transferred out in the mid-1990s. “By then, I was married with two kids,” he wrote in his memoir. “It was becoming less enticing to spend weekends in the woods.”

From 2006 to 2009, amid the fighting in Afghanistan and Iraq, Brown was assigned to ­another brigade that could have been ordered into combat. But in March 2009, while still a state senator, Brown transferred, taking a nondeployable headquarters position at the Joint Forces Headquarters in Milford.

His former brigade was called to active duty and ­deployed to Afghanistan in February 2010.

If Brown had still been in the unit, it is not certain that he would have been deployed. Slots for specific skills such as those possessed by JAG officers are filled as demands warrant.

Since 1991, in Operation Desert Storm, five JAG officers from Massachusetts have ­deployed to a combat zone, includ­ing one to Iraq from 2007 to 2008 and four to Afghanistan from 2011 to 2012.

Such military attorneys do everything from handling questions about the rules of engagement to drafting contracts with local civilian suppliers.

Sought active duty

In his memoir, Brown said that he has served where ­ordered.

“For myself, and for other friends in the Guard, there’s a feeling of somehow not doing our part because we have not been called to extended active duty,” he wrote. “For years, I’ve wished that I, too, could go over and serve, but, like all soldiers, I go where I am ordered.”

In 2010, the first year Brown was both a US senator and member of the Guard, he ­requested to serve his summer duty in Afghanistan during the August congressional recess.

“Doing so will help me better understand our ongoing mission in that country and provide me firsthand experience for my duties on the ­Senate Armed Services, Homeland Security, and Veterans ­Affairs committees,” the senator said in the statement.

He was gone for two weeks, but spent part of that time in predeployment training and traveling to and from Afghanistan.

His emotional airport ­reunion with his wife earned him the headline in the Boston Herald, “Love & War.”

Brown told reporters at Logan that the soldiers he visited were worried about the pace of President Obama’s troop drawdown in Afghanistan. He spoke of the 116-degree heat as he ate with the troops while dressed in full body armor.

An attack in Kabul

About seven months later, Brown also wrote, for a seven-page afterword attached to the paperback edition of his memoir, about enduring a mortar ­attack while at Bagram Airfield near Kabul.

“Another blast came, this one maybe 700 or 800 meters away, close enough to glimpse the bright flash of light,” Brown said. “A bunch of us took off at a dead run toward a nearby bunker. Three hours later, my flight was in the sky.”

This past February, Brown’s Guard career took a swift turn, when he transferred to the Maryland Guard and simultaneously landed a plum job at the Pentagon.

Brown could have gotten the same job as a member of the Massachusetts Guard, where he had served for more than three decades, but he said he decided to leave the state because of ­political meddling by Democrats and scrutiny by local news media. He once accused the Patrick administration of asking Guard officials about his ability to serve as a soldier while a federal elected official.

“I didn’t want to politicize my record,” the senator told the Globe at the time. “I wanted to go to a place where I would be treated on the merits. . . . I didn’t want any reference that, ‘Scott got special preference.’ ”

The Pentagon job, Brown said, came about after he saw a posting while browsing the ­National Guard website. The job requirements meshed ­almost perfectly with his position in the Senate and the workweek schedule it requires in the capital.

“Stature in community should be such as to enhance the capability to represent the NGB at the highest civilian levels,” the job posting said.

The posting required the rank of colonel, which Brown had not yet attained, but spokesmen explained that JAG officers are often allowed to work one rank above or below their current grade because of the uniqueness of their skill and the relatively few people available to perform it.

Brown won the job and executed the transfer quickly, ­by ­either military or civilian standards.

The job was posted Feb. 1, and the application period closed Feb. 20. By Feb. 22, Brown had transferred to the Maryland Guard and beaten out five other applicants to become assistant to the National Guard Bureau’s chief counsel, Colonel Christian Rofrano.

The 5,000-person bureau coordinates policies between Guard branches in each state and works from offices in ­Arlington, Va. About 50 bureau members are JAG officers, and 13 of them, including Rofrano and Brown, are stationed at the nation’s military nerve center, the Pentagon.

Brown’s posting has placed him in the upper echelons of the military, where his duty sometimes intersects with his budgetary and oversight roles as a senator.

For ease of communication, a spokeswoman said, the Pentagon office in which he works is near that of General Frank Grass, who oversees the National Guard and serves on the Joint Chiefs of Staff.

On July 19, Grass was called to testify before the Senate Armed Services Committee ­because he needed to be promoted from lieutenant general to four-star general, the rank assigned to the head of the ­National Guard Bureau.

During that hearing, Brown, as senator, lobbied against possible cuts in pay that he, as a Guardsman, receives.

“I would just ask you to look long and hard at that because … I think [it] will be a deterrent for our Guard and Reserve to serve,” Brown told Grass and two other generals also awaiting promotion. “So, I just want you to be aware of that. It is something I am aware of, and I would ask you to take a look at it.”

The senator concluded his statement by saying, “I look forward to being honored to vote for all of you.”

A week later, Grass moved up in rank as the Senate gave unanimous consent to a bevy of promotions. Among the more than 800 other officers also getting promoted in the same vote was Brown himself.

Once Brown had landed his new job in the Pentagon, he resumed a promotional process through the Maryland Guard that he started in Massachusetts.

“As a soldier, I’m privileged to serve alongside the very best men and women our nation has to offer,” Brown said in a statement announcing his promotion to colonel.

He is now paid a salary of $22,171 annually. That is based on $16,892 for weekend duty and $5,279 for summer duty.

Promoted in August

Brown’s promotion came at the beginning of August, a month in which he has typically fulfilled his annual summer training commitment.

But based on Brown’s role with Rofrano, his commander, he now fulfills both his weekend and summer training duty as the colonel decides, not necessarily confined either to weekends or the summer months.

Brown’s staff declined to say which days he served either this summer or during other times of the year, except to say he is current on his commitments. In September, he held two campaign fund-raisers in Washington after one of his duty days at the Pentagon.

A review of Brown’s senatorial and campaign schedule shows just five days in August when he did not have campaign events in Massachusetts or when the Senate was not in session in Washington.

Brown himself publicly ­declared he was performing Guard duty on just two days, Aug. 28 and Aug. 29, which ­coincided with the start of the Republican National Convention.

When he skipped all but the convention’s final day, it prompted questions about whether he was ducking an event where some of his party’s more extreme elements were on public display.

His supporters had a ready retort.

“As I understand it, he has to serve his nation in the National Guard,” said former lieutenant governor Kerry Healey, who was cochairwoman of the ­Massachusetts convention delegation.

When Brown finally arrived in Tampa, the senator also cited his Guard obligations as among the reasons he had to turn down a request to play a more prominent role in the proceedings.

“I have my own race, and I have my own life, as you know,” Brown told reporters. “There’s only so many days in the year to be a dad and a husband and a soldier and a senator and then run for reelection.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.