OLYMPIA, Wash. (AP) -- If history is any judge, the U.S. government will be paying for the Iraq and Afghanistan wars for the next century as service members and their families grapple with the sacrifices of combat.

An Associated Press analysis of federal payment records found that the government is still making monthly payments to relatives of Civil War veterans -- 148 years after the conflict ended.

At the 10 year anniversary of the start of the Iraq war, more than $40 billion a year are going to compensate veterans and survivors from the Spanish-American War from 1898, World War I and II, the Korean War, the Vietnam War, the two Iraq campaigns and the Afghanistan conflict. And those costs are rising rapidly.

U.S. Sen. Patty Murray said such expenses should remind the nation about war's long-lasting financial toll.

"When we decide to go to war, we have to consciously be also thinking about the cost," said Murray, D-Wash., adding that her WWII-veteran father's disability benefits helped feed their family.

Alan Simpson, a former Republican senator and veteran who co-chaired President Barack Obama's deficit committee in 2010, said government leaders working to limit the national debt should make sure that survivors of veterans need the money they are receiving.

"Without question, I would affluence-test all of those people," Simpson said.

With greater numbers of troops surviving combat injuries because of improvements in battlefield medicine and technology, the costs of disability payments are set to rise much higher.

The AP identified the disability and survivor benefits during an analysis of millions of federal payment records obtained under the Freedom of Information Act.

To gauge the post-war costs of each conflict, AP looked at four compensation programs that identify recipients by war: disabled veterans; survivors of those who died on active duty or from a service-related disability; low-income wartime vets over age 65 or disabled; and low-income survivors of wartime veterans or their disabled children.

--The Iraq wars and Afghanistan

So far, the wars in Iraq, Afghanistan and the first Persian Gulf conflict in the early 1990s are costing about $12 billion a year to compensate those who have left military service or family members of those who have died.

Those post-service compensation costs have totaled more than $50 billion since 2003, not including expenses of medical care and other benefits provided to veterans, and are poised to grow for many years to come.

The new veterans are filing for disabilities at historic rates, with about 45 percent of those from Iraq and Afghanistan seeking compensation for injuries. Many are seeking compensation for a variety of ailments at once.

Experts see a variety of factors driving that surge, including a bad economy that's led more jobless veterans to seek the financial benefits they've earned, troops who survive wounds of war and more awareness about head trauma and mental health.

--Vietnam War

It's been 40 years since the U.S. ended its involvement in the Vietnam War, and yet payments for the conflict are still rising.

Now above $22 billion annually, Vietnam compensation costs are roughly twice the size of the FBI's annual budget. And while many disabled Vietnam vets have been compensated for post-traumatic stress disorder, hearing loss or general wounds, other ailments are positioning the war to have large costs even after veterans die.

Based on an uncertain link to the defoliant Agent Orange that was used in Vietnam, federal officials approved diabetes a decade ago as an ailment that qualifies for cash compensation -- and it is now the most compensated ailment for Vietnam vets.

The VA also recently included heart disease among the Vietnam medical issues that qualify, and the agency is seeing thousands of new claims for that issue. Simpson said he has a lot of concerns about the government agreeing to automatically compensate for those diseases.

"That has been terribly abused," Simpson said.

Since heart disease is common among older Americans and is the nation's leading cause of death, the future deaths of thousands of Vietnam veterans could be linked to their service and their benefits passed along to survivors.

A congressional analysis estimated the cost of fighting the war was $738 billion in 2011 dollars, and the post-war benefits for veterans and families have separately cost some $270 billion since 1970, according to AP calculations.

--World War I, World War II and the Korean War

World War I, which ended 94 years ago, continues to cost taxpayers about $20 million every year. World War II? $5 billion.

Compensation for WWII veterans and families didn't peak until 1991 -- 46 years after the war ended -- and annual costs since then have only declined by about 25 percent. Korean War costs appear to be leveling off at about $2.8 billion per year.

Of the 2,289 survivors drawing cash linked to WWI, about one-third are spouses and dozens of them are over 100 years in age.

Some of the other recipients are curious: Forty-seven of the spouses are under the age of 80, meaning they weren't born until years after the war ended. Many of those women were in their 20s and 30s when their aging spouses died in the 1960s and 1970s, and they've been drawing the monthly payments since.

--Civil War and Spanish-American War

There are 10 living recipients of benefits tied to the 1898 Spanish-American War at a total cost of about $50,000 per year. The Civil War payments are going to two children of veterans -- one in North Carolina and one in Tennessee-- each for $876 per year.

Surviving spouses can qualify for lifetime benefits when troops from current wars have a service-linked death. Children under the age of 18 can also qualify, and those benefits are extended for a lifetime if the person is permanently incapable of self-support due to a disability before the age of 18.

Citing privacy, officials did not disclose the names of the two children getting the Civil War benefits.

Their ages suggest the one in Tennessee was born around 1920 and the North Carolina survivor was born around 1930. A veteran who was young during the Civil War would likely have been roughly 70 or 80 years old when the two people were born.

That's not unheard of. At age 86, Juanita Tudor Lowrey is the daughter of a Civil War veteran. Her father, Hugh Tudor, fought in the Union army. After his first wife died, Tudor was 73 when he remarried her 33-year-old mother in 1920. Lowrey was born in 1926.

Lowrey, who lives in Kearney, Mo., suspects the marriage might have been one of convenience, with her father looking for a housekeeper and her mother looking for some security. He died a couple years after she was born, and Lowrey received pension benefits until she was 18.

Now, Lowrey said, she usually gets skepticism from people after she tells them she's a daughter of a Civil War veteran.

"We're few and far between," Lowrey said.

___

AP Writer Mike Baker can be reached on Facebook: http://on.fb.me/HiPpEV