|Mountain pine beetle,|
A bark beetle is one of about 6,000 species in 247 genera of beetles in the subfamily Scolytinae. Previously, this was considered a distinct family (Scolytidae), but is now understood to be a specialized clade of the "true weevil" family (Curculionidae). Although the term "bark beetle" refers to the fact that many species feed in the inner bark (phloem) layer of trees, the subfamily also has many species with other lifestyles, including some that bore into wood, feed in fruit and seeds, or tunnel into herbaceous plants. Well-known species are members of the type genus Scolytus, namely the European elm bark beetle S. multistriatus and the large elm bark beetle S. scolytus, which like the American elm bark beetle Hylurgopinus rufipes, transmit Dutch elm disease fungi (Ophiostoma). The mountain pine beetle Dendroctonus ponderosae, southern pine beetle Dendroctonus frontalis, and their near relatives are major pests of conifer forests in North America. A similarly aggressive species in Europe is the spruce ips Ips typographus. A tiny bark beetle, the coffee berry borer, Hypothenemus hampei is a major pest on coffee plantations around the world.
Bark beetles go through four stages of life: egg, larvae, pupae, and adult, with the time to develop often relying on the species as well as the current temperature. While there is variation among species, generally adults first bore into a tree and lay their eggs in the phloem of the tree. This usually occurs in mid to late summer. Once the eggs hatch, the larvae then live in the tree, feeding on the living tissues below the bark, often leading to death of the tree if enough larvae are present. At the end of the larval stage, chambers are usually constructed for the pupae to overwinter until they are ready to emerge as an adult. 
Bark beetles are distinct in their morphology due to their small size and cylindrical shape. Bark beetles also have small appendages, with antennae that can be folded into the body and large mandibles to aid in the excavation of woody tissue. The legs of most bark beetles are very short and can be retracted or folded into the body. The combination of their shape and appendages greatly helps in the excavation of woody tissue. The eyes are also flattened and hypothesized to help see in low-light conditions.
Bark beetles feed and breed between the bark and the wood of various tree species. While some species, such as the mountain pine beetle (Dendroctonus ponderosae), do attack living trees, many bark beetle species feed on weakened, dying, or dead spruce, fir, and hemlock. Most restrict their breeding area to one part of the tree: twig, branch, stem, or root collar. Some breed in trees of only one species, while others in numerous species of tree. In undisturbed forests, bark beetles serve the purpose of hastening the recycling and decomposition of dead and dying wood and renewing the forest. However, a few species are aggressive and can develop large populations that invade and kill healthy trees and are therefore known as pests.
Bark beetles often attack trees that are already weakened by disease, overcrowding, conspecific beetles, or physical damage. In defense, healthier trees may produce sap, resin or latex, which often contains a number of insecticidal and fungicidal compounds that can kill, injure, or immobilize attacking insects. Sap is one of the first lines of defense of pines against bark beetles. Released sap or resins can plug bored holes of bark beetles and seal wounds. Resins also trap insect pests making some initial entry by bark beetles unsuccessful. Chemical compounds can also be induced by tree species that bind with amino acids in the gut of bark beetles, reducing their ability to process woody materials. When in large quantities, the sheer number of beetles can overwhelm the tree's defenses with resulting impacts on the lumber industry, water quality, fish and wildlife, and property values.
The oldest known member of the group is Cylindrobrotus from the Early Cretaceous (Barremian) aged Lebanese amber. A species of the extant mostly Neotropical genus Microborus is also known from the Cenomanian aged Burmese amber of Myanmar.
Some bark beetles form a symbiotic relationship with certain Ophiostomatales fungi, and are named "ambrosia beetles". The ambrosia beetles (such as Xyleborus) feed on fungal "gardens" cultivated on woody tissue within the tree. Ambrosia beetles carry the fungal spores in either their gut or special structures, called mycangia, and infect the trees as they attack them. Once a beetle chooses a tree, they release spores of this fungus along tunnels within the tree. These spores grow and eventually produce fruiting structures to be consumed by the beetles. This can allow for ambrosia beetles to indirectly feed from more tree species due to the reliance on the fungi for food and the fungi's ability to overcome some of the plant's chemical defenses. While the majority of ambrosia beetles infect dead trees, several species will infect trees considered healthy or under stress.
Bark beetles are most commonly recognized by their impact on the lumber industry. Massive outbreaks of mountain pine beetles in western North America after about 2005 have killed millions of acres of forest from New Mexico to British Columbia. Bark beetles enter trees by boring holes in the bark of the tree, sometimes using the lenticels, or the pores plants use for gas exchange, to pass through the bark of the tree. As the larvae consume the inner tissues of the tree, they often consume enough of the phloem to girdle the tree, cutting off the spread of water and nutrients. Ambrosia beetles are also known to aid in the spread of pathogens, such as diseases that can cause cankers, further damaging the trees they infect.  Like many other insects, Scolytinae emit pheromones to attract conspecifics, which are thus drawn to trees already colonized by bark beetles. This can result in heavy infestations and eventually death of the tree. Many are also attracted to ethanol produced as a byproduct of microbial growth in the dead woody tissues. Increases in international trade as well as the use of wood containers for storage has aided numerous species of bark beetle in spreading across the world. They are also extremely adaptable and able to quickly spread through new environments, as seen in France with eleven different species. Bark beetle infestations are also predicted to increase with global warming, meaning infestations will most likely increase in frequency as temperatures rise.  In the past, fire has been suggested as potential mechanism for controlling bark beetle populations; however, most studies of wildfire after beetle outbreaks have found no effect of beetle-caused tree mortality on wildfire size or severity. 
((cite journal)): Cite journal requires