Denying elderly NHS patients drugs and other treatments purely because of their age is to be made illegal from October, Ministers have announced.

Older patients who believe they have been not been offered diagnostic procedures, drugs or other treatments which are routinely available to those who are younger will have the right to sue individual NHS staff members or trusts, says the government.

Patients and their relatives will also be able to sue through the county courts if they believe an older patient has been treated without respect and dignity while in hospital, according to the changes, which are being made to the Equalities Act 2010 introduced by the last Labour government.

Health and care service organisations and personnel could also find themselves in court if a patient, or their carers, feel that they have been regarded as a lower priority than younger patients, or that a decision about their care or treatment has been made on any other grounds than medical need.

Announcing the move this week, Care Services Minister Paul Burstow said that he had heard "numerous stories" from people who feel they have been discriminated against.

"We know that older people are not always treated with the dignity and respect they deserve because of ageist attitudes. This will not be tolerated. Our population is ageing as more of us live longer. The challenge for the NHS is to look beyond a person's date of birth and meet the needs of older people as individuals," he said

Workplace discrimination is already illegal, and proposals to amend the Equalities Act to extend this ban to age discrimination in the health and social care fields were originally put forward by Labour Health Secretary Andy Burnham. Ministers have been consulting on the plans for more than a year.

The move had been welcomed by advocacy groups for older people. Age UK, which points out that the ban is "overdue," says it has long campaigned for this recognition that "discrimination based on your date of birth is as indefensible in 21st-century Britain as prejudice on the basis of race, gender, disability or sexual orientation."

"We hope the new law, which will apply to the NHS, social care and other services, will prevent older people being denied proper treatment because of their age. It sends a clear message to service providers that discrimination law will in future also protect older people," said the charity's director general, Michelle Mitchell.