A country where cows are sacred is exporting a record amount of red meat.

India was the world's top beef exporter last year, according to the U.S. Department of Agriculture, widening its lead over other more established suppliers such as Brazil and Australia.

That's because India exports large quantities of meat from water buffalo -- a member of the bovine family classified as beef by the USDA.

The buffalo trade has been growing rapidly and now earns India more export dollars than basmati rice.

Related: India will have more people than China by 2022

India's buffalo meat -- a chewier and cheaper alternative to beef -- mostly ends up on plates in Asia and the Middle East, where rising wealth is spurring demand among diners for animal protein.

But India's role in the global meat trade sticks out in the largely Hindu country where vegetarianism is widespread.

The cow is revered in Hindu culture, the religion observed by roughly 80% of India's 1.3 billion people, and restrictions on cattle slaughter apply in most states.

Buffaloes largely fall outside those bans.

Still, the $4.8 billion annual export trade has almost developed by accident -- the animals are needed to keep India's huge domestic dairy industry going, said Rabobank analyst Pawan Kumar.

This is unique among countries with large bovine exports, Kumar said. It also means buffalo meat from India is cheaper. That helped the country generate record export earnings from the beef last year, although growth is moderating from the 30% annual rate seen between 2010 to 2013.

Here's where it all goes: Vietnam is the top importer, with Malaysia, Egypt and Saudi Arabia other key markets.

Then there's China, which may actually be the largest consumer of the meat, according to Rabobank's Kumar. Some 40% of Indian buffalo is sent to Vietnam, before large quantities make their way across the Chinese border. That trade doesn't show up in official statistics.

A small amount is consumed in India. Many locals, including some Hindus and others in the Christian and Muslim populations, eat meat and poultry, and consumption is rising.

Data from market research firm Euromonitor International shows sales of beef, lamb and chicken in India have all increased steadily over the past six years.

Rising wealth is a big reason for the growth. Analyst Anastasia Alieva said India's disposable income has surged 95% since 2009, and meat consumption has nearly doubled over that time.

Related: India can't censor all Internet porn. Should it even try?

- CNN's Ravi Agrawal, Harmeet Singh and Sugam Pokharel contributed to this report.