(CNN) Maintaining an exercise regimen as you age is important, and having a pet who requires daily physical activity can be motivation to go for a walk. Unfortunately, walking a leashed dog can increase the risk of fractures in older adults, new research finds.

An injury from this simple activity can result in life-altering circumstances -- and such accidents are increasing, according to a study published in the medical journal JAMA Surgery

The study looked at patients who made visits to hospital emergency departments throughout the United States from 2004 to 2017, using data from the National Electronic Injury Surveillance System from the US Consumer Product Safety Commission. From 2004 to 2017, researchers estimated that there were more than 32,000 emergency room cases of fractures associated with walking leashed dogs among people 65 and older. Cases increased from an estimated 1,671 ER visits in 2004 to 4,396 in 2017.

Medical workers should be identifying at-risk patients when giving exercise recommendations to older patients, the University of Pennsylvania researchers said.

There are many reasons why older populations may already be more prone to fractures, such as reduced bone mass as patients age and increased fall frequency. Older women who owned dogs in need of walking were especially at risk of associated injury. Being female is already a risk factor for fractures and bone disease, such as osteoporosis. Since 78.6% of fractures in the study occurred in women, "older women considering dog ownership must be made aware of this risk," the researchers wrote.

Read More