The Indian president has approved a bill which bans the slaughter of cows and the sale and consumption of beef in the western state of Maharashtra.
Anyone found breaking the law will face a fine and up to five years in prison.
Hindus, who comprise 80% of India's 1.2bn population, revere cows and the sale and consumption of beef is banned or restricted in many states.
Correspondents say most beef sold in India is actually from water buffaloes which are not considered sacred at all.
But in Maharashtra, buffalo meat, generally seen to be of inferior quality, makes up only 25% of the market and the ban is likely to be felt more keenly there.
The state includes India's commercial capital and biggest city Mumbai.
The Maharashtra Animal Preservation (Amendment) Bill took 19 years to become law - it was first passed by the state's Hindu nationalist Bharatiya Janata Party (BJP)-Shiv Sena government in 1995 and was sent to the president for approval in January 1996.
The BJP, which returned to power in the state last year, once again pushed for it to be signed into law. Reports say a group of BJP MPs from the state met President Pranab Mukherjee last week to discuss the matter.
On Tuesday, Maharashtra Chief Minister Devendra Fadnavis tweeted his thanks to the president:
The BBC's Shilpa Kannan in Delhi says the Maharashtra beef ban is the toughest so far in India - along with cows, it also forbids the killing of bulls and bullocks and even possessing beef, which will now be considered as contraband.
Unhappy beef traders in Maharashtra are checking if they can challenge the ban - they say the move will render tens of thousands jobless.
Although many Hindus consider cows sacred, large numbers of India's population still eat beef and unproductive cattle are slaughtered for their meat and other products.
Following the Maharashtra ban, there is concern over what will happen to bulls and bullocks or to cows too old to produce milk or to give birth.
Critics of the bill say their owners, mostly farmers, could now be stuck feeding them for years until they die of natural causes.
Our correspondent says beef is more popular with the poor in India as it is typically cheaper than other meats such as chicken or mutton.
But because of religious sentiments and bans in various states, most of India's beef is exported - with a 20% share of the global market and exports worth more than $4bn (£2.6bn) a year, it is now the country's top agricultural export, beating the more famous basmati rice. Buffalo meat, however, accounts for 80% of the exports.
Prime Minister Narendra Modi, who led his BJP party to a landslide win in last year's general election, has in the past complained about India's "pink revolution" of rising meat exports, and expressed hope of bringing in a national ban on cow slaughter.