San Francisco police say they have made one of the biggest drug busts in the department's history after discovering a huge amount of ecstasy.

Chief Greg Suhr said Tuesday that officers seized more than 23 kilograms of MDMA powder and more than 30,000 pills Sunday with an estimated street value of about $1.5 million.

Two men, Benjamin Hagerl and Steven Terrell, both of San Francisco, were taken into custody after officers responding to a burglary call spotted a trail of blood that led them to an apartment where they found the drugs and $30,000 in cash.

Police say one of the men cut his hands breaking a window to enter the building.

Police are investigating whether the drugs were meant to be sold at last weekend's Outside Lands music festival.