This recipe is based loosely on mujadara, a staple of the Middle East that has many variations depending on the country or even the community. It’s often served as a side dish, but I like it as a main course, especially when serving a group. If you have time, pan-fried caramelized onion slices are a great garnish.
Place the lentils in a medium pot and add water to cover by 1 inch. Boil until just tender, about 15 minutes, depending on the size and age of the lentils. Drain.
Meanwhile, heat a medium pot over high heat and swirl in the oil. When it shimmers, add the onions and garlic and cook until lightly caramelized, about 10 minutes. Regulate the heat to avoid burning the garlic. Stir in the cumin, cinnamon, turmeric, and cayenne and cook for 2 minutes. Add the rice and stir to lightly toast and coat with spices, about 3 minutes. Stir the cooked lentils into the rice.
Pour in the water and add the salt. Bring to a rolling boil over high heat, reduce the heat to low and simmer, covered, until the liquid has been absorbed, about 20 minutes.