Rinse the beans and soak them overnight. Alternatively, boil them in a pot with water for at least 1 hour until tender. Reserve the strained bean liquid.
In a large pot or Dutch oven, add the soaked (or pre-cooked) beans, 1/2 of an onion, 1/2 of a bell pepper, and 2 crushed garlic cloves. Cover with 4 cups of fresh water (or reserved bean liquid) and simmer for about 45-60 minutes until the beans are tender. Remove and discard the onion, bell pepper, and garlic. Strain the beans, reserving the liquid (you will need about 4 cups).
In the same pot over medium-high heat, heat the oil. Add the chopped onion and bell pepper. Cook for 5-7 minutes until softened. Add the minced garlic, cumin, and oregano. Cook for 1 minute until fragrant.
Stir in the rice and toast it for 2 minutes to coat. Add the cooked beans and the reserved bean liquid. Stir well.
Bring to a boil, then reduce the heat to low. Cover and simmer for 20-25 minutes, or until the rice has absorbed all the liquid and is cooked through. Do not lift the lid during cooking.
Turn off the heat and let the dish rest, covered, for about 10 minutes to allow the flavors to meld and the rice to steam. Fluff with a fork before serving. Serve warm as a side to any meat dish.