BackgroundThousands of flowering plant species attract pollinators without offering rewards, but the evolution of this deceit is poorly understood. Rewardless flowers of the orchid Erycina pusilla have an enlarged median sepal and incised median petal (‘lip’) to attract oil-collecting bees. These bees also forage on similar looking but rewarding Malpighiaceae flowers that have five unequally sized petals and gland-carrying sepals. The lip of E. pusilla has a ‘callus’ that, together with winged ‘stelidia’, mimics these glands. Different hypotheses exist about the evolutionary origin of the median sepal, callus and stelidia of orchid flowers.ResultsThe evolutionary origin of these organs was investigated using a combination of morphological, molecular and phylogenetic techniques to a developmental series of floral buds of E. pusilla. The vascular bundle of the median sepal indicates it is a first whorl organ but its convex epidermal cells reflect convergence of petaloid features. Expression of AGL6 EpMADS4 and APETALA3 EpMADS14 is low in the median sepal, possibly correlating with its petaloid appearance. A vascular bundle indicating second whorl derivation leads to the lip. AGL6 EpMADS5 and APETALA3 EpMADS13 are most highly expressed in lip and callus, consistent with current models for lip identity. Six vascular bundles, indicating a stamen-derived origin, lead to the callus, stelidia and stamen. AGAMOUS is not expressed in the callus, consistent with its sterilization. Out of three copies of AGAMOUS and four copies of SEPALLATA, EpMADS22 and EpMADS6 are most highly expressed in the stamen. Another copy of AGAMOUS, EpMADS20, and the single copy of SEEDSTICK, EpMADS23, are most highly expressed in the stelidia, suggesting EpMADS22 may be required for fertile stamens.ConclusionsThe median sepal, callus and stelidia of E. pusilla appear to be derived from a sepal, a stamen that gained petal identity, and stamens, respectively. Duplications, diversifying selection and changes in spatial expression of different MADS-box genes shaped these organs, enabling the rewardless flowers of E. pusilla to mimic an unrelated rewarding flower for pollinator attraction. These genetic changes are not incorporated in current models and urge for a rethinking of the evolution of deceptive flowers.Electronic supplementary materialThe online version of this article (doi:10.1186/s12862-017-0938-7) contains supplementary material, which is available to authorized users.