Tubing strings in producing oil wells are often blocked by solid or semisolid deposits that necessitate costly remedial actions to maintain production. We describe here results obtained by a set of synchrotron radiation-based microanalytical techniques to investigate depth profiles and heterogeneity of organic compounds and metals in a series of deposit samples formed at different depths in blocked tubing strings from an operational oil well. Micrometer-scale synchrotron Fourier transform infrared (FTIR) spectroscopic and X-ray fluorescence (XRF) analyses using facilities at the National Synchrotron Light Source at Brookhaven National Laboratory are presented. Visualization, compositional mapping, high-resolution, and nondestructive analysis of samples are some of the main advantages of applying synchrotron-based microanalytical techniques. The results indicate that the depth profile of deposits formed along the same well varies and is characterized by the following main trends from deeper to shallower samples: (1) amount of deposits increases, a complete tubing plugging occurs at shallower levels; (2) concentration of inorganic components decreases; (3) sulfur-containing compounds in the deposits shift relative abundances from predominantly reduced to predominantly oxidized forms; (4) carbon content and H/C atomic ratio increase, S/C and N/C atomic ratios decrease; (5) higher molecular weight (HMW) n-alkane mixtures (wax components) shift the maximum of their distribution from higher to lower molecular weight mixtures; (6) maximum concentrations of some elements (V, Ba, Ti, and Cr) are found in the deepest samples; (7) elements present in all samples along the depth profile are Ca, Fe, Ni, Cu, Pb, and Br. Three different types of aggregates (10-60 μm) dominated by nonpolar, polar, and mixed polar/nonpolar compounds are identified in the same deposit. Predominantly nonpolar (Type I) aggregates contain long chain alkanes, aromatic compounds, and aliphatic thiols, consistent with the characteristics of "wax" type aggregates. The presence of carboxylic acids distributed irregularly toward the periphery of a FTIR mapped aggregate of this type is indicated. Predominantly polar (Type II) aggregates consist of aromatic structures, sulfur, nitrogen, and oxygen-containing compounds, some aliphatic structures, and water molecules possibly associated with salts. The characteristics of this type of aggregates are consistent with "asphaltene" type aggregates. This type of aggregate is found associated with inorganic (probably carbonate, clay, and/or corrosion) particles. Aggregates with mixed nonpolar/polar character are also observed, indicating possible adsorption of resins and asphaltenes by high molecular weight hydrocarbons. Depth profiles show heterogeneity in metal distribution, most likely reflecting systematic changes in proportions between the metal concentrations associated with the organic and inorganic phases in the deposits. Spatial heterogeneity in metals distribution is found on a scale of a hundred micrometers within the same sample. The study demonstrates the benefits of applying a set of complementary synchrotron-based microanalytical nondestructive methods for characterization of the deposits. The results demonstrate the suitability of the methods for studying organic solid aggregation and petroleum deposition problems, as well as the potential for testing and developing chemical and microbial methods for solid petroleum deposit remediation.