(CNN) Two US citizens who were asked last year by a US Border Patrol agent for their identification after he heard them speaking Spanish in a Montana convenience store are suing the federal agency and the agent.

Ana Suda and Martha "Mimi" Hernandez, who live in the small town of Havre, say a border patrol agent questioned them for 40 minutes in May 2018 after the co-workers stopped at the store as they each headed home from the gym.

Suda, who was born in Texas, and Hernandez, who was born in California, were in line when the Border Patrol agent, Paul O'Neal, began by commenting on Hernandez's accent and asking them where they were born. He then asked for their driver's licenses and had them stand by his patrol vehicle, the lawsuit says.

"It's unconstitutional to detain people just because of their language, accent, or color of their skin," said Cody Wofsy, staff attorney with the Immigrants' Rights Project of the American Civil Liberties Union, which filed the lawsuit Thursday on behalf of the women.

The women believed they were being detained and said a supervisor who came wouldn't let them go, the lawsuit says.

Read More