Under crowded conditions, Tribolium freemani larvae exhibited a delay in the increase of octopamine (OA) content, activity of juvenile‐hormone esterase (JHE), and ecdysteroid content, leading to a delay in pupation compared to the larvae under isolated conditions. Under crowded conditions, a peak OA content appeared at days 2–4, followed by a peak of JHE activity at day 7, the second OA peak at day 9, and an ecdysteroid peak at day 11 of the instar. Optical stress, on the other hand, caused an increase in OA and ecdysteroid contents, leading to an acceleration of pupation compared to controls. Whole‐body OA content reached its maximum 3 days before pupation and the ecdysteroid level 2 days later in larvae isolated, crowded, or optically stressed. The OA content, JHE activity, and ecdysteroid level showed a similar pattern after pupation till adult emergence both in crowded and uncrowded animals: peaks of OA content and JHE activity were observed at pupation, followed by the highest peak of ecdysone 4 days later (2 days before emergence). The ecdysteroid levels were higher in the crowded larvae reared under 24 h light conditions or treated with OA agonists than those in control larvae kept in the dark. Hence, isolation and optical stress increase OA content followed by JHE activity and ecdysteroid titer, leading to changes in metamorphosis program. Some OA agonists actually had the same effect as isolation and optical stress did, suggesting that OA is a causative agent in pupation programming of T. Freemani by inducing an increase in JHE activity, thus decreasing JH titer followed by an increase in ecdysteroid level and delayed pupation. Arch. Insect Biochem. Physiol. 37:34–46, 1998. © 1998 Wiley‐Liss, Inc.