From Lego blocks to a cell block.

An Oregon man was arrested Thursday for allegedly stealing Legos and other products and selling them online for large sums, police said.

Raji Afife Azar, 40, of Portland, was arrested after allegedly buying about $13,000 worth of stolen toys from undercover investigators, according to KGW-TV.

Detectives executed a search warrant on Azar’s home and discovered at least $50,000 in Lego sets stolen from Fred Meyer stores, police said. Authorities said the figure didn’t include the value of things that were allegedly stolen from other stores, according to The Oregonian.

A police photo showed Azar’s garage filled with Lego sets.

Police believe Azar arranged his thefts online through websites such as Craigslist and OfferUp, according to KGW-TV. He then would meet with the thieves, buy the stolen Legos cheap and turn around and sell them online to make a profit, police said.

The Fred Meyer Organized Retail Unit investigators launched their own probe early this year after suspecting that Azar was heading the operation, police said.

"Investigators remind anyone purchasing items from a non-retail location to be aware of items sold as 'new' or in unopened packages with prices that seem too good to be true - the items may be stolen," police said.

Azar was charged with aggravated first-degree theft, first-degree theft, laundering a monetary instrument and computer crime. He had no previous criminal record, The Oregonian reported.