ASSOCIATED PRESS A woman worships a cow as Indian Hindus offer prayers to the River Ganges, holy to them during the Ganga Dussehra festival in Allahabad, India, Sunday, June 8, 2014. Allahabad on the confluence of rivers the Ganges and the Yamuna is one of Hinduismâs holiest centers. (AP Photo/Rajesh Kumar Singh)

NEW DELHI -- The Bombay High Court today dealt a tiny blow to Maharashtra's anti-beef law, ruling that it is not illegal to possess beef, but only if it is imported from outside the state.

The Bombay High Court upheld the ban against the slaughter of cows, bulls and buffaloes within the state.

Last year, the Maharashtra Animal Preservation (Amendment) Bill, 1995 received the presidential assent, coming into force two decades after it was passed by the state legislature. Under the law, anyone found selling beef or being in possession of it can be jailed for five years and fined Rs. 10,000.

While a 1976 law prevented the slaughter of cows in Maharashtra, the 1995 law added bulls and buffaloes.

The Bharatiya Janata Party-Shiv Sena government in Maharashtra welcomed the legislation, twenty years after the same alliance had passed the bill in 1995. The BJP, now in power at the Centre, is in favor of a nation-wide ban on cow slaughter as the animal is revered by Hindus.

While beef traders argued that the ban would render thousands of people unemployed, there were many who found it to be an infringement on their personal dietary choice. But the Maharashtra government argued that eating beef is not a fundamental right.

On Friday, the Bombay High Court upheld the law which bans the slaughter of bulls and buffaloes within the state, but struck down the part which criminalizes the possession of beef as long as that beef is from outside the state.

Bombay High Court judges Justice Abhay Oka and Justice S. C. Gupte struck down Section 5D of the Act: "No person shall have in his possession flesh of a cow, bull or bullock slaughtered outside Maharashtra."

Removing Section 5D from the Act, the Maharashtra government had previously argued would encourage people to take their cattle to the state border and slaughter them.

Also on HuffPost India: